使用Navicat12 将Oracle数据库同步到mysql中出现的问题
1.解决同步时出现的Row size too large错误。
现象截图如下
出错信息
1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
由于目标MySql库项目要求使用用innodb格式的表,所以网上其他人那些改myisamg表格式的方法就不能用了,测试了很多方法,只有一下方法最终解决了这个的问题。
解决方法,在My.cnf或my.ini文件中加入
innodb_file_per_table=1
innodb_file_format=Barracuda
innodb_file_format_check = ON
innodb_log_file_size = 512M
innodb_strict_mode = 0
如果是myisam表则无此问题
2.解决longblob大数据无法插入数据库的问题
打开数据库或sql文件,发现longblob字段中的值非常长
解决方法:
参考:https://blog.****.net/llliarby/article/details/81095732
https://www.jb51.net/article/46393.htm
由于mysql文件如果不设置的话longblob默认只有1MB大小,所以过大的数据插入会报错,于是
my.ini或my.cnf中增加以下字段
innodb_file_per_table=1
innodb_file_format=Barracuda
max_allowed_packet=1024M
顺便吐槽一下,notepad++貌似对大文本支持不太好,基本打开100多MB的sql文件就卡死了,只能用UltraEdit才可以打开