Bug #73395 Error durin migrate from SQL Server to mysql
Submitted: 25 Jul 2014 13:44 Modified: 27 Feb 2016 11:33
Reporter: powder 366 Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S1 (Critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[25 Jul 2014 13:44] powder 366
Description:
Cant migrate from SQL Server to mysql:

Starting...
Connect to source DBMS...
- Connecting...
Connect to source DBMS done
Reverse engineer selected schemas....
Reverse engineering dbo from FacmultaDemo
- Reverse engineering catalog information
Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 321, in reverseEngineer
    collation_row = execute_query(connection, "SELECT DATABASEPROPERTYEX(?, 'Collation')", catalog_name).fetchone()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_mssql_grt.py", line 132, in <lambda>
    con.add_output_converter(0, lambda value: value if value is None else value.decode('utf-16'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/encodings/utf_16.py", line 16, in decode
    return codecs.utf_16_decode(input, errors, True)
UnicodeDecodeError: 'utf16' codec can't decode byte 0x00 in position 20: truncated data

Traceback (most recent call last):
  File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 192, in thread_work
    self.func()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration_schema_selection.py", line 162, in task_reveng
    self.main.plan.migrationSource.reverseEngineer()
  File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration.py", line 351, in reverseEngineer
    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: UnicodeDecodeError("'utf16' codec can't decode byte 0x00 in position 20: truncated data"): error calling Python module function DbMssqlRE.reverseEngineer
ERROR: Reverse engineer selected schemas: UnicodeDecodeError("'utf16' codec can't decode byte 0x00 in position 20: truncated data"): error calling Python module function DbMssqlRE.reverseEngineer
Failed

How to repeat:
Start migration in MySQL Workbench
[4 Aug 2014 11:38] MySQL Verification Team
Thank you for the bug report. Please provide more details of the issue: WorkBench version, SQL Server version, MySQL server version and if possible a small DB which
allow to repeat the issue. Thanks.
[5 Aug 2014 15:58] powder 366
Append backup db to test this.
Versions see the two screen shots
[5 Aug 2014 15:58] powder 366
screen1

Attachment: Screen Shot 2014-08-05 at 17.56.10.png (image/png, text), 152.75 KiB.

[5 Aug 2014 15:59] powder 366
screen2

Attachment: Screen Shot 2014-08-05 at 17.55.19.png (image/png, text), 27.30 KiB.

[5 Aug 2014 16:06] powder 366
screen3

Attachment: Screen Shot 2014-08-05 at 18.05.21.png (image/png, text), 34.17 KiB.

[5 Aug 2014 17:55] MySQL Verification Team
Thank you for the feedback. I found problems to migrate however different of
your report ( I have one table personen not created and copy data step). So please detail step by step how you tried the migration so I can check if possible
to repeat it. Thanks.
[6 Aug 2014 8:07] powder 366
Logs and screen shots:

odbc
source
dest
next

1. keep, keep_error, keep_log
2. one, one_error, one_log
3. last, last_error, last_log

If I go back and then next for all steps 1-3, I get the following (i.e repeat migration):

back_again_error, back_again_log
[6 Aug 2014 8:08] powder 366
odbc

Attachment: odbc.png (image/png, text), 96.15 KiB.

[6 Aug 2014 8:08] powder 366
source

Attachment: source.png (image/png, text), 172.08 KiB.

[6 Aug 2014 8:08] powder 366
dest

Attachment: dest.png (image/png, text), 161.90 KiB.

[6 Aug 2014 8:08] powder 366
next

Attachment: next.png (image/png, text), 152.64 KiB.

[6 Aug 2014 8:09] powder 366
keep

Attachment: keep.png (image/png, text), 157.00 KiB.

[6 Aug 2014 8:09] powder 366
keep_error

Attachment: keep_error.png (image/png, text), 272.47 KiB.

[6 Aug 2014 8:09] powder 366
keep_log

Attachment: keep_log.rtf (text/rtf), 3.71 KiB.

[6 Aug 2014 8:09] powder 366
one

Attachment: one.png (image/png, text), 153.48 KiB.

[6 Aug 2014 8:10] powder 366
one_error

Attachment: one_error.png (image/png, text), 275.65 KiB.

[6 Aug 2014 8:10] powder 366
one_log

Attachment: one_log.rtf (text/rtf), 3.71 KiB.

[6 Aug 2014 8:10] powder 366
last

Attachment: last.png (image/png, text), 148.96 KiB.

[6 Aug 2014 8:10] powder 366
last_error

Attachment: last_error.png (image/png, text), 279.24 KiB.

[6 Aug 2014 8:11] powder 366
last_log

Attachment: last_log.rtf (text/rtf), 3.72 KiB.

[6 Aug 2014 8:11] powder 366
back_again_error

Attachment: back_again_error.rtf (text/rtf), 2.22 KiB.

[6 Aug 2014 8:12] powder 366
back_again_error

Attachment: back_again_error.png (image/png, text), 265.95 KiB.

[6 Aug 2014 11:55] MySQL Verification Team
Thank you for the feedback. Please try for the source the ODBC(native) option
for Connection Method. Thanks.
[6 Aug 2014 11:56] powder 366
Have you tried odbc native and it works?
[6 Aug 2014 11:58] powder 366
And where can I get this driver http page?
[6 Aug 2014 12:00] MySQL Verification Team
That option is what always I used and with less error than the Data Source you
have used and I didn't installed any driver was already installed on my machine.
Thanks.
[6 Aug 2014 12:02] powder 366
Which datasource are we talking about sql server or mysql (Im on mac)?
[6 Aug 2014 12:05] powder 366
Could you please provide my with screen shots how I should configure it?
[6 Aug 2014 12:13] powder 366
Native driver did not work see screenshot
[6 Aug 2014 12:14] powder 366
native odbc

Attachment: Screen Shot 2014-08-06 at 14.13.11.png (image/png, text), 297.14 KiB.

[6 Aug 2014 12:35] MySQL Verification Team
Alright now I understood your issue I was testing on local Windows. I am verifying
the bug report so that migration approach could be processed at least as Feature
Request. Thank you for all feedback.
[6 Aug 2014 12:36] powder 366
I just want the tool to work:-)
[7 Aug 2014 19:22] powder 366
When is this bug getting fixed? I have provided all the information to solve it.
[23 Oct 2014 14:19] Milosz Bodzek
Hi,
Thank you for your time for so precise describe the problem. Can you run workbench from command line with --log-level=debug3 and send me wb.log? You can find it in Help->Locate log files. 
In meantime you can also check if migration will work with FreeTDS drivers.
Here is a guide how to install drivers on mac: http://mysqlworkbench.org/2013/02/installing-a-driver-for-microsoft-sql-server-and-sybase-...
And here you can find how to migrate db from MS SQL Server: http://mysqlworkbench.org/2012/07/migrating-from-ms-sql-server-to-mysql-using-workbench-mi...
[28 Feb 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".