Saturday, November 02, 2013

Error in MySQL Migration Tool: UnicodeDecodeError("'utf16' codec can't decode byte 0x2e in position 38: truncated data")

Using MySQL WorkBench 6.0.7.11215 on Windows 2008 tried running the migration tool to migrate SQL Server 2008 R2 database to local MySQL database and got this error:

ERROR: Reverse engineer selected schemata: UnicodeDecodeError("'utf16' codec can't decode byte 0x2e in position 38: truncated data"): error calling Python module function DbMssqlRE.reverseEngineer

The script failed at a particular table which only had a few rows of data in it and really wasn't needed anymore so I deleted all the rows - that didn't solve the problem as expected because I figured it was only copying the schema.

I checked the column names and nothing odd there - so I just dropped the whole table since I didn't need it and that solved the problem.

There may have been something in the meta data for that table which caused the problem such as single quote, but brute force method worked for me.