詭異的OGG-01004 Database error 1403 no data found

abstractcyj發表於2016-11-18
配置某個客戶OGG環境時,同事報告某個表資料沒有同步過去
錯誤是:
2016-11-18 14:53:46  WARNING OGG-01004  Oracle GoldenGate Delivery for Oracle, rep_zt.prm:  Aborted grouped transaction on '*', Database error 1403 (OCI Error ORA-01403: no data found, SQL <UPDATE /*+ RESTRICT_ALL_REF_CONS */ ""."*" SET "PROCESS_STATUS" = :a1,"ERROR_MSG" = :a2,"TRANSACTION_HEADER_ID" = :a3 WHERE "BATCH_CODE" = :b0>).
2016-11-18 14:53:46  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, rep_zt.prm:  Repositioning to rba 86746 in seqno 51.
2016-11-18 14:53:46  WARNING OGG-01154  Oracle GoldenGate Delivery for Oracle, rep_zt.prm:  SQL error 1403 mapping * to * OCI Error ORA-01403: no data found, SQL <UPDATE /*+ RESTRICT_ALL_REF_CONS */ * " SET "PROCESS_STATUS" = :a1,"ERROR_MSG" = :a2,"TRANSACTION_HEADER_ID" = :a3 WHERE "BATCH_CODE" = :b0>.
2016-11-18 14:53:46  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, rep_zt.prm:  Error mapping from * to *.
2016-11-18 14:53:46  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, rep_zt.prm:  PROCESS ABENDING.

檢查配置檔案沒有發現異常。
檢查資料,源端與目標端資料都一致。

嘗試在源端看了一下這個表的trandata, 目標端的主鍵是COL1

GGSCI (ysbpmvsrd02) 31> info trandata h2.t_ap_inv_header_iface
Logging of supplemental redo log data is enabled for table H2.T_AP_INV_HEADER_IFACE.
Columns supplementally logged for table H2.T_AP_INV_HEADER_IFACE: TRANSACTION_HEADER_ID.

目標端:
GGSCI (yserpvdrd01) 14> info trandata h2.t_ap_inv_header_iface
Logging of supplemental redo log data is enabled for table H2.T_AP_INV_HEADER_IFACE.
Columns supplementally logged for table H2.T_AP_INV_HEADER_IFACE: BATCH_CODE.

恍然大悟

問了問開發人員,主鍵有調整。


修復:在源端執行
delete trandata h2.t_ap_inv_header_iface
add trandata h2.t_ap_inv_header_iface

重啟程式之後資料複製OK



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2128702/,如需轉載,請註明出處,否則將追究法律責任。

相關文章