GoldenGate OGG-01004 ORA-01400 Cannot insert null into ...

发布时间:2020-08-08 12:22:25 作者:abstractcyj
来源:ITPUB博客 阅读:328

OGG出现故障, ORA-01400, cannot insert null into “TEST“.“TEST“
目标端复制进程使用了配置HANDLECOLLISIONS, 此配置在目标端更新时,如果更新不到数据,会将UPDATE转换成insert
但是因为源端并没有配置所有列的附加日志,所以,没有被更新的列并不会包含在insert中,从而导致错误

做了以下步骤, 这里是临时解决方案:
1. 将列修改成null: alter table test modify col1 null;
2. 启动复制进程
3. 检查数据:select count(*) from test where col1 is null (发现有八条)
4. 处理并手工同步这八条数据
5. 将字段改成not null : alter table test modify col1 not null;

最终解决: 需要加入表的所有列的附加日志: alter table test add supplemental log data (ALL) columns;
DDL操作在生产环境较为危险, 暂缓动作


MOS文档ID: Replicat Abends With Errror ORA-01400: Cannot Insert NULL Into Table for Not Null Columns When Specifying INSERTALLRECORDS (文档 ID 1994869.1)

                      REPLICAT Reports ORA-01400: Cannot Insert NULL When Using HANDLECOLLISIONS (文档 ID 1576900.1)

REPLICAT tried to UPDATE an existing row, but none was found, so due to parameter HANDLECOLLISIONS, the failed UPDATE was converted into an INSERT.
That INSERT then failed because the Trail file did not have all the columns, because the record was for an UPDATE for 5 out of 15 columns, where the table on the Oracle database had the NOT NULL constraint set for all columns.

The cause of the problem has been determined from the following points;



推荐阅读:
  1. HAProxy启动时候常见问题
  2. ORA-01940: cannot drop a user that is currently

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

cannot goldengate ogg-01004

上一篇:必看的数据库规范

下一篇:打开win10系统程序时老是闪退解决方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》