使用ogg 从oracle 同步mysql遇到问题记录


ORACLE    同步mysql遇到问题:


2018-08-27 10:59:54  WARNING OGG-01004  Aborted grouped transaction on DESIGNXXxx, Database error 1105 ([SQL error 1105]Parameter of prepared statement which is set through mysql_send

_long_data() is longer than 'max_allowed_packet' bytes

可以修改mysql服务器的配置(my.ini 或者 my.cnf 文件)参数:max_allowed_packet = 500M 来解决,缺陷是该方法需要重启mysql服务器。




2018-08-27 18:16:03  WARNING OGG-01154  SQL error 1364 mapping RAPANORAMAGEOM to PMC.RAPANORAMAGEOM [SQL error 1364]Field 'Geomtrycolor' doesn't have a default value.


在数据库中对报错的字段设置默认值, 整数:0 ,字符串:设为NULL,


找到对应的表--->设计表--->默认选择框(设置默认值)


--Key column Sex (20) is missing from update on table GUEST'

alter table GUEST add primary key(Guestid);



2018-08-28 09:53:45  ERROR   OGG-00768  DYNSQL: Preparing SQL statement (ID = 0) failed. SQL error (1064). You have an error in your SQL syntax; check the manual that corresponds to your MySQ

L server version for the right syntax to use near '%T SET %S WHERE %W' at line 1.


解决方法:

检查两边数据库的表字段是否一致,可能是缺少字段


屏蔽保留字表

xxx.DBA_TABLES_TMP




2018-09-14 16:46:37  WARNING OGG-01154  SQL error 1364 mapping USERLIMITIxxxxx to SMS.USERLIMITINFODETAIL [SQL error 1364]Field 'Userlimitid' doesn't have a default value.


去除  sql_mode 中STRICT_TRANS_TABLES,


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29863023/viewspace-2214347/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29863023/viewspace-2214347/

你可能感兴趣的:(数据库)