使用ogg从oracle 同步mysql会遇到什么问题

这篇文章主要介绍了使用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,

感谢你能够认真阅读完这篇文章,希望小编分享的“使用ogg从oracle 同步mysql会遇到什么问题”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注行业资讯频道,更多相关知识等着你来学习!