As many already know, I’ve been trying to get the MySQL Workbench
migration feature working between Microsoft SQL Server 2012 and
MySQL 5.5. There are a number of features added to the 5.2.43
point release, and one led me to believe that the Migration tool
expects to find the data in a schema of its own, as opposed to
the dbo schema. Having made that change in Microsoft
SQL Server, it did appear to have a positive impact on the
migration and when I corrected a character set mismatch
it worked perfectly!
MySQL Workbench successfully migrated the
schema and table but failed to migrate the data because of a
character set mismatch. I updated Bug
66516 the log file from the character set mismatch before I
retyped all 9 test rows to make sure they were in a
latin1 character set.
I shortened the original log file because the actual log had over 2,000 blanks line . That’s probably something that should be fixed in the code too.
Starting... Prepare information for data copy... Prepare information for data copy done Create shell script for data copy... Table copy script written to C:\Users\McLaughlinM\Desktop\copy_migrated_tables.cmd Create shell script for data copy done Determine number of rows to copy.... Counting number of rows in tables... wbcopytables.exe --count-only --passwords-from-stdin --odbc-source=DSN=SQL Server ODBC;DATABASE=;UID=sa --table [studentdb] [studentdb].[conquistador] 18:29:13 [INF][ copytable]: Opening ODBC connection to 'DSN=SQL Server ODBC;DATABASE=;UID=sa;PWD=XXX' 18:29:14 [INF][ copytable]: ODBC connection to 'DSN=SQL Server ODBC;DATABASE=;UID=sa;PWD=' opened 9 total rows in 1 tables need to be copied: - [studentdb].[studentdb].[conquistador]: 9 Determine number of rows to copy finished Copy data to target RDBMS.... Migrating data... wbcopytables.exe --odbc-source=DSN=SQL Server ODBC;DATABASE=;UID=sa --target=student@mclaughlinsql:3306 --progress --passwords-from-stdin --thread-count=1 --table [studentdb] [studentdb].[conquistador] `studentdb` `conquistador` [conquistador_id], [conquistador], [actual_name], [nationality] `studentdb`.`conquistador`:Copying 4 columns of 9 rows from table [studentdb].[studentdb].[conquistador] ERROR: `studentdb`.`conquistador`:Inserting Batch: Incorrect string value: '\x9Acak' for column 'actual_name' at row 7 `studentdb`.`conquistador`:Finished copying 0 rows in 0m00s 29:15 [INF][ copytable]: Opening ODBC connection to 'DSN=SQL Server ODBC;DATABASE=;UID=sa;PWD=XXX' 29:16 [INF][ copytable]: ODBC connection to 'DSN=SQL Server ODBC;DATABASE=;UID=sa;PWD=' opened 29:16 [INF][ copytable]: Connecting to MySQL server at mclaughlinsql:3306 with user student 29:16 [INF][ copytable]: Connection to MySQL opened Copy helper has finished Data copy results: - `studentdb`.`conquistador` has FAILED (0 of 9 rows copied) 0 tables of 1 were fully copied Copy data to target RDBMS finished Tasks finished with warnings and/or errors, view the logs for details Finished performing tasks. |
Originally, I thought the failure was due to
the extended ASCII characters in the Microsoft SQL Server table.
It still failed when I took all of the extended characters out.
However, Alfredo suggested it was a character set issue, which is
obvious when I looked more closely at the log –
'\x9Acak' is clearly an incorrect string. I retyped
the INSERT statement for the nine rows and it worked
perfectly. Naturally, I’ve updated open Bug
66516 with the log file.
If you’re curious about the Microsoft SQL Server configuration check this post.