您好,登錄后才能下訂單哦!
OGG出現(xiàn)故障, ORA-01400, cannot insert null into “TEST“.“TEST“
目標(biāo)端復(fù)制進(jìn)程使用了配置HANDLECOLLISIONS, 此配置在目標(biāo)端更新時(shí),如果更新不到數(shù)據(jù),會(huì)將UPDATE轉(zhuǎn)換成insert
但是因?yàn)樵炊瞬]有配置所有列的附加日志,所以,沒有被更新的列并不會(huì)包含在insert中,從而導(dǎo)致錯(cuò)誤
做了以下步驟, 這里是臨時(shí)解決方案:
1. 將列修改成null: alter table test modify col1 null;
2. 啟動(dòng)復(fù)制進(jìn)程
3. 檢查數(shù)據(jù):select count(*) from test where col1 is null (發(fā)現(xiàn)有八條)
4. 處理并手工同步這八條數(shù)據(jù)
5. 將字段改成not null : alter table test modify col1 not null;
最終解決: 需要加入表的所有列的附加日志: alter table test add supplemental log data (ALL) columns;
DDL操作在生產(chǎn)環(huán)境較為危險(xiǎn), 暫緩動(dòng)作
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;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。