goldengate的HANDLECOLLISIONS引數

還不算暈發表於2013-10-29
HANDLECOLLISIONS 是一個 replicat 程式引數,主要在 initial load 中使用。
在 replicat 程式中使用該引數時,即使目標資料庫環境中存在資料完整性問題(如 update、delete 操作遇到缺失行或重複的插入操作),
replicat 程式仍然能夠繼續處理 trail 中的資料。

如果使用了 HANDLECOLLISIONS 引數,則 replicat 程式將按如下方式處理資料:
Missing updates are ignored.
Missing deletes are ignored.
Duplicate inserts are turned into updates.

如果要使用 HANDLECOLLISIONS 引數,只需在 replicat 程式引數檔案中加入該引數,然後重啟 replicat 程式即可生效。

--如果不使用此引數,雙方表不一致,會出現程式掛起,如下的出錯:
2013-08-29 15:40:33  WARNING OGG-00869  Oracle GoldenGate Delivery for Oracle, rep1.prm:  OCI Error ORA-00001: unique constraint (TEST.SYS_C0011221) violated (status = 1). INSERT INTO "TEST"."TEST1" ("AA") VALUES (:a0).
2013-08-29 15:40:33  WARNING OGG-01004  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Aborted grouped transaction on 'TEST.TEST1', Database error 1 (OCI Error ORA-00001: unique constraint (TEST.SYS_C0011221) violated (status = 1). INSERT INTO "TEST"."TEST1" ("AA") VALUES (:a0)).
2013-08-29 15:40:33  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Repositioning to rba 1426 in seqno 2.
2013-08-29 15:40:33  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Repositioning to rba 1426 in seqno 2.
2013-08-29 15:40:33  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Error mapping from TEST.TEST1 to TEST.TEST1.
2013-08-29 15:40:33  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep1.prm:  PROCESS ABENDING.

###################
2013-08-29 15:29:39  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle, rep2.prm:  REPLICAT REP2 started.
2013-08-29 15:29:39  WARNING OGG-01004  Oracle GoldenGate Delivery for Oracle, rep2.prm:  Aborted grouped transaction on 'TEST.TEST1', Database error 1403 (OCI Error ORA-01403: no data found, SQL <DELETE FROM "TEST"."TEST1"  WHERE "AA" = :b0>).
2013-08-29 15:29:39  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, rep2.prm:  Repositioning to rba 1018 in seqno 0.
2013-08-29 15:29:39  WARNING OGG-01154  Oracle GoldenGate Delivery for Oracle, rep2.prm:  SQL error 1403 mapping TEST.TEST1 to TEST.TEST1 OCI Error ORA-01403: no data found, SQL <DELETE FROM "TEST"."TEST1"  WHERE "AA" = :b0>.
2013-08-29 15:29:39  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, rep2.prm:  Repositioning to rba 1018 in seqno 0.
2013-08-29 15:29:39  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, rep2.prm:  Error mapping from TEST.TEST1 to TEST.TEST1.
2013-08-29 15:29:39  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep2.prm:  PROCESS ABENDING.

相關文章