MySQL Forums
Forum List  »  Microsoft SQL Server

Migrate from SQL Server 2000 using Workbench
Posted by: Paul Guillou
Date: July 04, 2016 04:19AM

Hi, I am trying to migrate from SQL Server 2000 to MySQL 5.7 using Workbench 6.3.7. I, like many others according to a search online, are getting a failure at "Retrieve schema list from source".
---------------------------------------
MESSAGE LOG EXTRACT:
Connect to source DBMS done
Check target DBMS connection...
- Connecting to target...
Connecting to Mysql@localhost:3306...
Connecting to Mysql@localhost:3306...
Connected
Check target DBMS connection done
Retrieve schema list from source....
- Checking connection...
- Fetching catalog names...
Traceback (most recent call last):
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_mssql_grt.py", line 192, in getCatalogNames
return [ row[0] for row in execute_query(connection, query) ]
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\db_mssql_grt.py", line 62, in execute_query
return get_connection(connection_object).cursor().execute(query, *args, **kwargs)
pyodbc.ProgrammingError: ('42S02', "[42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'sys.databases'. (208) (SQLExecDirectW)")

Traceback (most recent call last):
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work
self.func()
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\migration_source_selection.py", line 457, in task_fetch_schemata
self.main.plan.migrationSource.doFetchSchemaNames(only_these_catalogs)
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\migration.py", line 250, in doFetchSchemaNames
catalog_names = self.getCatalogNames()
File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.3 CE\modules\migration.py", line 214, in getCatalogNames
return self._rev_eng_module.getCatalogNames(self.connection)
SystemError: ProgrammingError("('42S02', "[42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'sys.databases'. (208) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames
ERROR: Retrieve schema list from source: ProgrammingError("('42S02', "[42S02] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'sys.databases'. (208) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames
Failed.
-------------------------------------------
I have looked at possible solutions but I can't follow them.

This is what i have in the file db_mssql_grt.py...
---------------------------------
def getCatalogNames(connection):
"""Returns a list of the available catalogs.

[NOTE] From MSDN: [A catalog] is equivalent to a databases in SQL Server.
"""
query_pre_90 = 'SELECT name FROM sys.databases'
query_post_90 = 'exec sys.sp_databases'

serverVersion = connected_server_version(connection)

query = query_pre_90 if serverVersion.majorNumber < 9 else query_post_90

return [ row[0] for row in execute_query(connection, query) ]

--------------
Any ideas?

Paul.

Options: ReplyQuote


Subject
Written By
Posted
Migrate from SQL Server 2000 using Workbench
July 04, 2016 04:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.