Bug #77287 Migration Tool failure upon schema retrieval
Submitted: 9 Jun 2015 20:43 Modified: 29 Dec 2015 13:33
Reporter: Pat Lee Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:6.3.3.0 Build 592 OS:MacOS
Assigned to: CPU Architecture:Any

[9 Jun 2015 20:43] Pat Lee
Description:
I keep getting this error when attempting to run Migration Tool on OS X. I'm trying to migrate from SQL Server 2000 (hosted Windows Server 2003) to MySQL on a Linux box. 

I've tried using both the ODBC FreeTDS and the paid ODBC SQL Server driver from Actual Technologies. Running a Test Connection shows that they are both able to connect to the MSSQL server, but I keep getting this error when it tries to retrieve schema from the source, specifically "Could not find stored procedure 'sys.sp_databases'"

Here is the full error log...
----
Starting...
Connect to source DBMS...
- Connecting to source...
Connect to source DBMS done
Check target DBMS connection...
- Connecting to target...
Check target DBMS connection done
Retrieve schema list from source....
- Checking connection...
- Fetching catalog names...
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/db_mssql_grt.py", line 186, in getCatalogNames
    return [ row[0] for row in execute_query(connection, query) ]
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/db_mssql_grt.py", line 62, in execute_query
    return get_connection(connection_object).cursor().execute(query, *args, **kwargs)
pyodbc.Error: ('37000', "[37000] [Actual][SQL Server] Could not find stored procedure 'sys.sp_databases'. (2812) (SQLExecDirectW)")

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 192, in thread_work
    self.func()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/migration_source_selection.py", line 456, in task_fetch_schemata
    self.main.plan.migrationSource.doFetchSchemaNames(only_these_catalogs)
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/migration.py", line 250, in doFetchSchemaNames
    catalog_names = self.getCatalogNames()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/plugins/migration.py", line 214, in getCatalogNames
    return self._rev_eng_module.getCatalogNames(self.connection)
SystemError: Error("('37000', "[37000] [Actual][SQL Server] Could not find stored procedure 'sys.sp_databases'. (2812) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames
ERROR: Retrieve schema list from source: Error("('37000', "[37000] [Actual][SQL Server] Could not find stored procedure 'sys.sp_databases'. (2812) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames
Failed

How to repeat:
Attempt to migrate from remote SQL Server 2000 to remote MySQL database.
[2 Sep 2015 9:28] Milosz Bodzek
Hi Pat Lee!
Thank you for your bug report. Can you edit db_mssql_grt.py file and change line (about 187):
query = 'exec sys.sp_databases'
to
query = 'exec sp_databases'
Then save file and run migration wizard once again. Let me know if that helps.
[29 Nov 2015 13:33] MySQL Verification Team
Please do what was asked to do in prior comment. Thanks.
[30 Dec 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".