Bug #69629 When migration SQL Server 2005 to MySQL, 4 bytes UTF-8 ERROR
Submitted: 1 Jul 2013 14:04 Modified: 26 Mar 2014 5:38
Reporter: gan li Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:6.0.2 beta OS:Windows (windows7 64)
Assigned to: CPU Architecture:Any
Tags: migration, SQLServer

[1 Jul 2013 14:04] gan li
Description:
Sql2005  DataBases  COLLATE  is Chinese_PRC_CI_AS. 
MySQL Workbench  Version 6.0.2 beta.

The Sql2005 DataBases contain some 4 bytes UTF-8.

`ceshibug`.`tNewsUser`:Copying 27 columns of 1 rows from table [ceshibug].[dbo].[tNewsUser]

ERROR: `ceshibug`.`tNewsUser`:Error during charset conversion of wstring: No error

`ceshibug`.`tNewsUser`:Finished copying 0 rows in 0m00s

How to repeat:
migration SQL Server 2005 to MySQL, which contain some 4 bytes UTF-8 ERROR.
See the test bug database.
[10 Jul 2013 20:58] Sergio Andres De La Cruz Rodriguez
I was able to repeat with MySQL Workbench 6.0.2 and 6.0.3 in Windows 8 x64 using the native SQL Server ODBC drivers. When testing in Linux (using the FreeTDS odbc drivers), everything went fine (in the sense that it migrated without issues).

This issue is better explained here: http://dba.stackexchange.com/a/37355/25847 along with a workaround to make it work.

We are still analyzing this issue to find out if it is a bug in our wbcopytables.exe or in the Microsoft ODBC drivers. In the mean time, you can either:

1. Use MySQL Workbench for Linux to migrate your database. Please check this post on how to install the FreeTDS ODBC drivers in Linux: http://mysqlworkbench.org/2013/02/installing-a-driver-for-microsoft-sql-server-and-sybase-...

2. Follow the workaround suggested in the Stack Exchange post ( http://dba.stackexchange.com/a/37355/25847 )

Another useful resource to understand the nature of this problem: "UCS-2 vs. UTF-16 (not quite Kramer vs. Kramer)": http://blogs.msdn.com/b/michkap/archive/2005/05/11/416552.aspx

Hope this helps.
[12 Jul 2013 22:08] Sergio Andres De La Cruz Rodriguez
Posted by developer:
 
This bug is triggered due to improper UCS-2 strings being generated by Microsoft's ODBC drivers. From our side, the "solution" here is to provide more context about what table column presents this error.
[19 Jul 2013 5:04] gan li
Thanks.
When using in Linux, everything is fine.
[26 Mar 2014 5:38] Philip Olson
QA and Development team determined that this bug is specific to the MSSQL ODBC driver, and not MySQL Workbench. Let's hope it's been fixed....
[30 Mar 2016 6:23] Rumesh Bandara
Did microsoft fix this issue in MSSQL ODBC driver or still the problem exists?