Bug #79299 MYSQL workbench - Data Migration from SQL Server 2014
Submitted: 16 Nov 2015 22:49 Modified: 18 May 2016 3:02
Reporter: SASTRY Vedantam Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:6.3 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[16 Nov 2015 22:49] SASTRY Vedantam
Description:
I am not able to copy even a simple table with 4 columns..  The same table dataload is working with “ispirer SQLWAys Wizard”  tool and also with Workbench 6,2,4  I am able to insert the row manually ......

insert into Domain_Version ( VersionID, Version, DataChangeCounter, IncUpgradePrefix) values (1,'62.1',1,'7.5.0.0');

mysql> desc domain_version;
+-------------------+-------------+------+-----+---------+-------+
| Field             | Type        | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| VersionID         | int(11)     | NO   | PRI | NULL    |       |
| Version           | varchar(20) | NO   |     | NULL    |       |
| DataChangeCounter | int(11)     | NO   |     | NULL    |       |
| IncUpgradePrefix  | varchar(50) | NO   |     | NULL    |       |
+-------------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql>
mysql> select * from domain_version;
+-----------+---------+-------------------+------------------+
| VersionID | Version | DataChangeCounter | IncUpgradePrefix |
+-----------+---------+-------------------+------------------+
|         1 | 62.1    |                 1 | 7.5.0.0          |
+-----------+---------+-------------------+------------------+
1 row in set (0.00 sec)

mysql>

MySQL Worekbench Migration Wizard : 

Starting...
Prepare information for data copy...
Prepare information 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 NMX;DATABASE=;UID=sa" --table-file=c:\users\vvedanta\appdata\local\temp\tmpefotma
13:33:59 [INF][      copytable]: --table [SAMPLENMXCATALOG]    [dbo].[Domain_Version]
13:33:59 [INF][      copytable]: Opening ODBC connection to [unknown] 'DSN=SQL Server NMX;DATABASE=;UID=sa;PWD=XXX'
13:33:59 [INF][      copytable]: ODBC connection to 'DSN=SQL Server NMX;DATABASE=;UID=sa;PWD=' opened

1 total rows in 1 tables need to be copied:
- [SAMPLENMXCATALOG].[dbo].[Domain_Version]: 1
Determine number of rows to copy finished
Copy data to target RDBMS....

Migrating data...
wbcopytables.exe --odbc-source="DSN=SQL Server NMX;DATABASE=;UID=sa" --target="root@127.0.0.1:3307" --progress --passwords-from-stdin --log-level=debug3 --thread-count=1 --source-rdbms-type=Mssql --table-file=c:\users\vvedanta\appdata\local\temp\tmptmdswc
Loading table information from file c:\users\vvedanta\appdata\local\temp\tmptmdswc

`SAMPLENMXCATALOG`.`Domain_Version`:Copying 4 columns of 1 rows from table [SAMPLENMXCATALOG].[dbo].[Domain_Version]
ERROR: `SAMPLENMXCATALOG`.`Domain_Version`:Inserting Data: Data too long for column 'Version' at row 1
ERROR: `SAMPLENMXCATALOG`.`Domain_Version`:Failed copying 1 rows
FINISHED

13:33:59 [INF][      copytable]: Logger set to level 'debug3'. '0111111'

13:33:59 [INF][      copytable]: --table [SAMPLENMXCATALOG]    [dbo].[Domain_Version]              `SAMPLENMXCATALOG`                `Domain_Version`           [VersionID]         `VersionID`         [VersionID], CAST([Version] as NVARCHAR(20)) as [Version], [DataChangeCounter], CAST([IncUpgradePrefix] as NVARCHAR(50)) as [IncUpgradePrefix]

13:33:59 [INF][      copytable]: Connecting to MySQL server at 127.0.0.1:3307 with user root

33:59 [INF][      copytable]: Connection to MySQL opened
33:59 [DB1][      copytable]: Detected server version=5.7.9-enterprise-commercial-advanced-log
33:59 [DB1][      copytable]: Detected max_allowed_packet=4194304
33:59 [DB1][      copytable]: Retrieving trigger list
33:59 [INF][      copytable]: Opening ODBC connection to [Mssql] 'DSN=SQL Server NMX;DATABASE=;UID=sa;PWD=XXX'
34:00 [INF][      copytable]: ODBC connection to 'DSN=SQL Server NMX;DATABASE=;UID=sa;PWD=' opened
34:00 [INF][      copytable]: Connecting to MySQL server at 127.0.0.1:3307 with user root
34:00 [INF][      copytable]: Connection to MySQL opened
34:00 [DB1][      copytable]: Detected server version=5.7.9-enterprise-commercial-advanced-log
34:00 [DB1][      copytable]: Detected max_allowed_packet=4194304
34:00 [DB1][      copytable]: Executing query: SELECT count(*) FROM [SAMPLENMXCATALOG].[dbo].[Domain_Version]
34:00 [DB1][      copytable]: Executing query: SELECT [VersionID], CAST([Version] as NVARCHAR(20)) as [Version], [DataChangeCounter], CAST([IncUpgradePrefix] as NVARCHAR(50)) as [IncUpgradePrefix] FROM [SAMPLENMXCATALOG].[dbo].[Domain_Version] ORDER BY [VersionID]
34:00 [DB2][      copytable]: Columns from source table [SAMPLENMXCATALOG].[dbo].[Domain_Version] (4):
34:00 [DB2][      copytable]: 1 - VersionID: int  (type=SQL_INTEGER, len=10)
34:00 [DB2][      copytable]: 2 - Version: nvarchar UNSIGNED (type=SQL_WVARCHAR, len=80)
34:00 [DB2][      copytable]: 3 - DataChangeCounter: int  (type=SQL_INTEGER, len=10)
34:00 [DB2][      copytable]: 4 - IncUpgradePrefix: nvarchar UNSIGNED (type=SQL_WVARCHAR, len=200)
34:00 [DB2][      copytable]: Columns from target table `SAMPLENMXCATALOG`.`Domain_Version` (4):
34:00 [DB2][      copytable]: 1 - VersionID: MYSQL_TYPE_LONG
34:00 [DB2][      copytable]: 2 - Version: MYSQL_TYPE_STRING
34:00 [DB2][      copytable]: 3 - DataChangeCounter: MYSQL_TYPE_LONG
34:00 [DB2][      copytable]: 4 - IncUpgradePrefix: MYSQL_TYPE_STRING
34:00 [WRN][      copytable]: 8 characters could not be converted to UTF-8 from column Version during copy
34:00 [WRN][      copytable]: 14 characters could not be converted to UTF-8 from column IncUpgradePrefix during copy
34:00 [INF][      copytable]: Statement execution failed: Data too long for column 'Version' at row 1:

34:00 [INF][      copytable]: Re-enabling triggers for schema 'SAMPLENMXCATALOG'
34:00 [DB1][      copytable]: Retrieving trigger definitions
34:00 [INF][      copytable]: No triggers found for 'SAMPLENMXCATALOG'

Copy helper has finished

Data copy results:
- `SAMPLENMXCATALOG`.`Domain_Version` has FAILED (0 of 1 rows copied)
0 tables of 1 were fully copied
Click [Retry] to retry copying remaining data from tables
Copy data to target RDBMS finished
Tasks finished with warnings and/or errors, view the logs for details
Finished performing tasks.

How to repeat:
Create the table in the source and target databases  SQL Server 2014 and MySQL 5.7 . 

Insert the record in SQL Server. 

Use the Migration wizard to create the schema and data migartion into MySQL and data migration will fail.
[19 Nov 2015 22:34] MySQL Verification Team
Thank you for the bug report.
[18 May 2016 3:02] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.7 release, and here's the changelog entry:

Several SQL Server 2014 database migration improvements.

Thank you for the bug report.