SQL Server到Mysql迁移(使用Mysql Workbench)的数据传输错误 [英] SQL Server to Mysql migration (using Mysql Workbench) data transfer error

查看:264
本文介绍了SQL Server到Mysql迁移(使用Mysql Workbench)的数据传输错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Mysql Work bench(6.3)将数据库从MS Sql Server(2008)迁移到Mysql.在批量数据传输"过程中,出现以下警告错误.这仅在列类型(例如varchar,char)中发生.当我尝试使用所有"int"列的表时,没有问题.这是当我尝试使用列(Name(char),age(int),Type(varchar))迁移男孩"表时得到的日志

I am using Mysql Work bench(6.3) to migrate Database from MS Sql server(2008) to Mysql. It is erroring out during the "bulk Data Transfer" with below warnings. This is happening only with column types like (varchar, char). When I tried table with all 'int' columns there is no issue. Here is the log I got when I tried to migrate "Boy" table with columns (Name(char),age(int),Type(varchar))

> `[WRN][      copytable]: 20 characters could not be converted to UTF-8 from column Name during copy
   [WRN][      copytable]: 24 characters could not be converted to UTF-8 from column Type during copy
   [INF][      copytable]: Statement execution failed: Data too long for column 'Name' at row 1:

INSERT INTO `Test`.`Boy` (`Name`, `Age`, `Type`) VALUES ('John       \0 `Test`.`Boy` (`Name',10,'Type is Lien\0\0\0\0�\�7\0\0\0\0\0\0\0\0\0\0\0\0\0\0d\0\0defperformance_schemasession_variablessession_variables\rVariable_name\rVARIABLE_NAME\0@\0\0\0�\0\0\0]\0\0defperformance_schemasession_variablesse')`

MSsql中的排序规则是MySQL中的Latin1和UTF8.
另外,将表数据导出到平面文件中并在Mysql中导入也可以(但是这是表到表而不是批量传输).

Collation in MSsql is Latin1 and UTF8 in MySQL.
Also, exporting table data in to flat file and importing it in Mysql worked (but this is table to table not bulk transfer) ..

推荐答案

将源连接方法从"ODBC数据源"更改为"ODBC数据源(免费TDS)"是可行的.如该链接所述 http ://www.martin-brennan.com/could-not-successfully-convert-ucs-2-string-to-utf-8/

Changing the Source connection method from 'ODBC Data Source' to 'ODBC Data Source(Free TDS)' worked. As explained in this link http://www.martin-brennan.com/could-not-successfully-convert-ucs-2-string-to-utf-8/

这篇关于SQL Server到Mysql迁移(使用Mysql Workbench)的数据传输错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆