Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not retrieving schema list from source when migrating from MSSQL to MySQL using Workbench

Tags:

I'm trying to migrate my database which is in MS SQL Server to MySQL, I'm using Workbench to do so. I get connection to both databases but get the following warning:

Retrieve schema list from source. 

And this is the message log:

Starting... Connect to source DBMS... - Connecting to source... Connect to source DBMS done Check target DBMS connection... - Connecting to target... Connecting to [email protected]:3306... Connecting to [email protected]:3306... Connected Check target DBMS connection done Retrieve schema list from source.... - Checking connection... - Fetching catalog names... WARNING: The following catalogs where not found: Autotask - Fetching schema names... - Finished Retrieve schema list from source finished Tasks finished with warnings and/or errors, view the logs for details Finished performing tasks. 

Autotask is the name of the db. Please what am I doing wrong?

Note: even with the warning the wizard let me click next, but the next screen is supposed to list schematas, but as it is empty I can't continue.

Thanks in advance. Pablo

like image 884
Pablo Santamaria Avatar asked Jun 11 '13 07:06

Pablo Santamaria


2 Answers

In case someone else comes across this same issue, and you don't have access to the "sa" user, I thought I'd post how to resolve the issue.

The underlying problem is user permissions. Although you can login to the database fine there is a specific permission that needs to be set in order for it to work with MySQL Workbench. The permission you need is "View Any Definition" which is found under the users "Securables" tab.

There is a good short video explaining it all here http://mysqlworkbench.org/2013/08/video-tutorial-setup-a-restricted-sql-server-account-for-migrations-with-mysql-workbench/ and the specific part is located at 2:17.

If the database is on a shared host - as was the one I needed to access - I would recommend simply emailing the host (preferably via your clients main contact) and they will hopefully do it for you. The host in my case switched it on for 1 day as there must be some other potential security risks at their end having it turned on.

Hope this helps someone else out there.

Management Studio > Server > Security > Logins > User > Properties > Securables > Explicit > View any definition > Grant

like image 139
SaRiD Avatar answered Oct 01 '22 14:10

SaRiD


Make sure you're connecting to MS SQL as user "sa". Non-admin users may lack rights that are necessary to extract schemas...

like image 44
Onlyjob Avatar answered Oct 01 '22 15:10

Onlyjob