Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change TAC database from H2 to MySQL by using MetaServlet

Hi All,

 

I would like to change default database H2 to MySql. When migrating i need all the users , projects and jobs created in H2 database.

 

I googled it and found we can use MetaservletCaller. I am using following syntax but it throws an error.

 

MetaServletCaller.bat --tac-url http://localhost:8080/org.talend.administrator --json-params='{"actionName": "migrateDatabase", "dbConfigPassword": "admin", "mode": "synchronous", "sourceUrl": "jdbc:h2:C:/Talend/6.4.1/tac/apache-tomcat/webapps/org.talend.administrator/WEB-INF/database/talend_administrator", "sourceUser": "tisadmin", "sourcePasswd": "tisadmin", "targetPasswd": "root", "targetUrl": "jdbc:mysql://localhost:3306/talend_administrator", "targetUser": "root"}'

 

Error Message : {"error":"A JSONObject text must begin with '{' at character 1","returnCode":2}

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can try base64 encode of json params and try a get request to metaservlet endpoint.

https://help.talend.com/reader/rJGzSCBb8MvnaZHhs978KQ/ulwkupQQphDnbxaUbGscNg

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Can you switch the quotes?
Use double quotes at beginning/end of json.
Use single quote around key/value of json.
Anonymous
Not applicable
Author

Hi Chirgal,

 

Thanks for quick reply.

I am getting below error.

 

{"error":"A JSONObject text must begin with '{' at character 1","returnCode":2}

Anonymous
Not applicable
Author

You can try base64 encode of json params and try a get request to metaservlet endpoint.

https://help.talend.com/reader/rJGzSCBb8MvnaZHhs978KQ/ulwkupQQphDnbxaUbGscNg

Anonymous
Not applicable
Author

Hi Chirgal,

 

Thanks it's worked for me.