Bug #66030 Data Migration From SQL Server Failing
Submitted: 26 Jul 2012 17:21 Modified: 9 Sep 2012 5:46
Reporter: John Aylward Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:5.2.41 OS:MacOS (Darwin 12.0.0)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[26 Jul 2012 17:21] John Aylward
Description:
Data migration from remote SQL Server 2008 db to local MySQL db fails at the stage 'Fetch Schemata List'. Click 'Test Connection' is successful for noth source and taregt databases

----- Developer Notes -----

MySQL Workbench CE for Mac OS X version 5.2.41  revision 9727
Configuration Directory: /Users/johnaylward/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
Cairo Version: 1.9.1
OS: Darwin 12.0.0
CPU: 8x Intel(R) Core(TM) i7-2720QM CPU @ 2.20GHz, 8.0 GB RAM

How to repeat:
Start Migration Wizard.  Input source rdbms - remote SQL Server 2008 using ODBC.  Continue.  Input target rdbms - local MySQL using TCP/IP. Continue.  Fails to connect to source rdbms.
[27 Jul 2012 13:36] Alfredo Kojima
Can you click the Show Logs button and paste the contents here?
[10 Aug 2012 15:25] John Aylward
Apologies for delay in replying.  Here is the log:

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Mssql@Palace...
Opening ODBC connection to DSN=Palace;DATABASE=palace;UID=palace;PWD=XXXX...
Connected
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 147, in connect
    _connections[connection.__id__]["version"] = getServerVersion(connection)
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 65, in run
    self.func()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration_source_selection.py", line 406, in task_connect
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Error during Connect to source DBMS: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 543, in update_status
    task.run()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 80, in run
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Exception in task 'Connect to source DBMS': SystemError('AttributeError("\'NoneType\' object has no attribute \'split\'"): error calling Python module function DbMssqlRE.getServerVersion',)

Failed
[10 Aug 2012 15:25] John Aylward
Apologies for delay in replying.  Here is the log:

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Mssql@Palace...
Opening ODBC connection to DSN=Palace;DATABASE=palace;UID=palace;PWD=XXXX...
Connected
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 147, in connect
    _connections[connection.__id__]["version"] = getServerVersion(connection)
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 65, in run
    self.func()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration_source_selection.py", line 406, in task_connect
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Error during Connect to source DBMS: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 543, in update_status
    task.run()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 80, in run
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Exception in task 'Connect to source DBMS': SystemError('AttributeError("\'NoneType\' object has no attribute \'split\'"): error calling Python module function DbMssqlRE.getServerVersion',)

Failed
[14 Aug 2012 19:21] Alfredo Kojima
Hi John

We'll need some help from you to diagnose this one. With a text editor, open the /Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py file
and around line 174 you'll find a line that looks like:
    ver_string = execute_query(connection, "SELECT SERVERPROPERTY('ProductVersion')").fetchone()[0]

Change that to:

    ver_string = execute_query(connection, "SELECT CAST(SERVERPROPERTY('ProductVersion') AS VARCHAR)").fetchone()[0]

Then save and retry. Thanks!
[15 Aug 2012 15:23] John Aylward
Your last suggestion worked!  Thanks
[15 Aug 2012 15:28] Armando Lopez Valencia
Thanks for your report John.
Importing...
[9 Sep 2012 5:46] Philip Olson
Fixed as of the upcoming Workbench 5.2.43, and here's the changelog entry:

 Migrating from a remote SQL Server 2008 database to a local
 MySQL database would fail at the "Fetch Schemata List" stage 
 of the database migration wizard, as it was unable to connect 
 to the source database. 

Thank you for the report.
[18 Jun 2013 13:48] Petr Hybler
Hello I have a problem with "migration tool" in MySQL Workbench ... I set up Source and Target and after that I am not able to "Retrive schema list from source" ... this is the log

*******************************************************************************/

Starting...

Connect to source DBMS...

- Connecting to source...

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\MySQL\MySQL Workbench 5.2 CE\modules\db_mssql_grt.py", line 185, in getCatalogNames

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

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\db_mssql_grt.py", line 62, in execute_query

    return get_connection(connection_object).cursor().execute(query, *args, **kwargs)

pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'sp_databases'. (2812) (SQLExecDirectW)")

Traceback (most recent call last):

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work

    self.func()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\migration_source_selection.py", line 428, in task_fetch_schemata

    self.main.plan.migrationSource.doFetchSchemaNames(only_these_catalogs)

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\migration.py", line 221, in doFetchSchemaNames

    catalog_names = self.getCatalogNames()

  File "C:\Program Files\MySQL\MySQL Workbench 5.2 CE\modules\migration.py", line 189, in getCatalogNames

    return self._rev_eng_module.getCatalogNames(self.connection)

SystemError: ProgrammingError("('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'sp_databases'. (2812) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames

ERROR: Retrieve schema list from source: ProgrammingError("('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'sp_databases'. (2812) (SQLExecDirectW)")"): error calling Python module function DbMssqlRE.getCatalogNames

Failed

*******************************************************************************/

Can you help me please? I need to migrate SQL Server db to MySQL
[20 Aug 2013 20:43] Nick Rawlins
Seems to have re-occured in the latest MySQL Workbench?

I am having this issue too.
[17 Feb 2015 7:20] pilla tataji
hi,
when i am trying to perform migration from sql server 2008 to mysql i am getting below error.

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Mssql@DRIVER=SQL Server;SERVER=IPAddress\SQLEXPRESS...
Opening ODBC connection to DRIVER={SQL Server};SERVER=IPAddress\SQLEXPRESS;DATABASE={};UID=sa;PWD=XXXX;...
ERROR: Connection failed: No open connection to Mssql@DRIVER=SQL Server;SERVER=IPAddress\SQLEXPRESS
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\modules\db_mssql_grt.py", line 124, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (67)')
Connecting to Mssql@DRIVER=SQL Server;SERVER=IPAddress\SQLEXPRESS...
Opening ODBC connection to DRIVER={SQL Server};SERVER=IPAddress\SQLEXPRESS;DATABASE={};UID=sa;PWD=XXXX;...
ERROR: Connection failed: No open connection to Mssql@DRIVER=SQL Server;SERVER=IPAddress\SQLEXPRESS
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\modules\db_mssql_grt.py", line 124, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (67)')

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\workbench\wizard_progress_page_widget.py", line 66, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\modules\migration_source_selection.py", line 443, in task_connect
    raise e
SystemError: Error("('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (67)')"): error calling Python module function DbMssqlRE.connect
ERROR: Error during Connect to source DBMS: Error("('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect);
 [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (67)')"): error calling Python module function DbMssqlRE.connect
ERROR: Exception in task 'Connect to source DBMS': SystemError('Error("(\'08001\', \'[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (67)\')"): error calling Python module function DbMssqlRE.connect',)

Failed

can any one please help me?
[5 Mar 2015 19:57] Debanjan Pradhan
I am migrating from sql server 2005 to mysql, one schema migrated successfully , getting below error message for the second schema...
Can you please help?

*******Error LOG*******
Starting...
Migrate Selected Objects....
- Migrating...
- Migrating schema USICOAL...
- Migrating schema contents for schema USICOAL
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_mssql_migration_grt.py", line 440, in migrateCatalog
    return instance.migrateCatalog(state, sourceCatalog)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_generic_migration_grt.py", line 183, in migrateCatalog
    targetSchema = self.migrateSchema(state, sourceSchema, target_catalog)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_generic_migration_grt.py", line 220, in migrateSchema
    self.migrateSchemaContents(state, targetSchema, sourceSchema)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_generic_migration_grt.py", line 236, in migrateSchemaContents
    target_table = self.migrateTableToMySQL(state, source_table, targetSchema)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_mssql_migration_grt.py", line 165, in migrateTableToMySQL
    targetTable = super(MSSQLMigration, self).migrateTableToMySQL(state, sourceTable, targetSchema)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_generic_migration_grt.py", line 273, in migrateTableToMySQL
    targetColumn = self.migrateTableColumnToMySQL(state, sourceColumn, targetTable)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_mssql_migration_grt.py", line 405, in migrateTableColumnToMySQL
    target_column = GenericMigration.migrateTableColumnToMySQL(self, state, source_column, targetTable)
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_generic_migration_grt.py", line 375, in migrateTableColumnToMySQL
    if not self.migrateDatatypeForColumn(state, source_column, target_column):
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\db_mssql_migration_grt.py", line 271, in migrateDatatypeForColumn
    target_column.precision = source_column.simpleType.numericPrecision
AttributeError: 'NoneType' object has no attribute 'numericPrecision'

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\migration_object_migration.py", line 112, in task_migrate
    self.main.plan.migrate()
  File "C:\Program Files\MySQL\MySQL Workbench 6.1 CE\modules\migration.py", line 473, in migrate
    self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog)
SystemError: AttributeError("'NoneType' object has no attribute 'numericPrecision'"): error calling Python module function DbMssqlMigration.migrateCatalog
ERROR: Migrate Selected Objects: AttributeError("'NoneType' object has no attribute 'numericPrecision'"): error calling Python module function DbMssqlMigration.migrateCatalog
Failed
[6 Mar 2015 18:30] Debanjan Pradhan
Please ignore my last question as I figured out that-
The problem was with the source database as it was containing user defined data type....
[25 Apr 2016 20:53] Shanmugasudan Veerabahu
Hi I am migrating a database from Microsoft SQL Server 2014 to MySQL using workbench 6.3. I use migration wizard in the workbench to connect the source and target RDBMS. I encounter an error when i "Test Connection" for MS SQL 2014.

I find the below error during the process.

Logs:

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Mssql@DRIVER=SQL Server;SERVER=localhost...
Opening ODBC connection to DRIVER={SQL Server};SERVER=localhost;DATABASE={};UID=sa;PWD=XXXX;...
ERROR: Connection failed: No open connection to Mssql@DRIVER=SQL Server;SERVER=localhost
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_mssql_grt.py", line 124, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (5)')
Connecting to Mssql@DRIVER=SQL Server;SERVER=localhost...
Opening ODBC connection to DRIVER={SQL Server};SERVER=localhost;DATABASE={};UID=sa;PWD=XXXX;...
ERROR: Connection failed: No open connection to Mssql@DRIVER=SQL Server;SERVER=localhost
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_mssql_grt.py", line 124, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (5)')

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\wizard_progress_page_widget.py", line 66, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\migration_source_selection.py", line 444, in task_connect
    raise e
SystemError: Error("('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (5)')"): error calling Python module function DbMssqlRE.connect
ERROR: Error during Connect to source DBMS: Error("('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect);
 [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (5)')"): error calling Python module function DbMssqlRE.connect
ERROR: Exception in task 'Connect to source DBMS': SystemError('Error("(\'08001\', \'[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (5)\')"): error calling Python module function DbMssqlRE.connect',)

Failed

Can you please help
[25 Apr 2016 22:24] Shanmugasudan Veerabahu
I am able to get through the step. please ignore the post thanks!
[30 Mar 2017 9:37] Dhivya Narayanasamy
hi, I am getting this Attribute Error : 'No Type' objectives has no attribute 'split' when i tried to migrate sql db to mysql db in mysql workbench 

these are the Log details :

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Mssql@sa...
Opening ODBC connection to Driver=sa;DATABASE=;UID=sa;PWD=XXXX...
Connected to Mssql@ 11.0.2100.60
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 147, in connect
    _connections[connection.__id__]["version"] = getServerVersion(connection)
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 174, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
AttributeError: 'NoneType' object has no attribute 'split'

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 65, in run
    self.func()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration_source_selection.py", line 406, in task_connect
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Error during Connect to source DBMS: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 543, in update_status
    task.run()
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 80, in run
    raise e
SystemError: AttributeError("'NoneType' object has no attribute 'split'"): error calling Python module function DbMssqlRE.getServerVersion
*** ERROR: Exception in task 'Connect to source DBMS': SystemError('AttributeError("\'NoneType\' object has no attribute \'split\'"): error calling Python module function DbMssqlRE.getServerVersion',)

Failed

-----

i tried "Alfredo Kojima" solution (given below). but it didn't help. I still get the same error. Please help me. 

Alfredo Kojima solution: // We'll need some help from you to diagnose this one. With a text editor, open the /Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py file
and around line 174 you'll find a line that looks like:
    ver_string = execute_query(connection, "SELECT SERVERPROPERTY('ProductVersion')").fetchone()[0]

Change that to:

    ver_string = execute_query(connection, "SELECT CAST(SERVERPROPERTY('ProductVersion') AS VARCHAR)").fetchone()[0]

Then save and retry. Thanks!  //