您好,登录后才能下订单哦!
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;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。