这两天发现了奇怪的问题,就是源端插入一条数据的时候会导致目标端插入两次,然后导致目标端违反唯一性约束,进程abended。
报错如下:
2013-07-29 12:39:41 WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, r33ciq1.prm: SQL error 1 mapping EPCIQ.T_TSQY_GOODS_PASS to EPCIQ.T_TSQY_GOODS_PASS OCIError ORA-00001: unique constraint (EPCIQ.PK_T_IDEC2_GOODS_LIST_PASS) violated (status = 1), SQL <INSERT INTO "EPCIQ"."T_TSQY_GOODS_PASS" ("ID","LIST_ID","WAREHOUSE_NO","QUANTITY","QUANTITY_UNIT","NET_WEIGHT","WEIGHT_UNIT","CREATE_TIME","UPDATE_DATE","RESERVED1","RESERVED2","RESERVED3","IDEC_HEAD_>.
2013-07-29 12:39:41 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, r33ciq1.prm: Repositioning to rba 112020416 in seqno 409.
2013-07-29 12:39:41 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, r33ciq1.prm: Error mapping from EPCIQ.T_TSQY_GOODS_PASS to EPCIQ.T_TSQY_GOODS_PASS.
2013-07-29 12:39:41 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, r33ciq1.prm: PROCESS ABENDING.
为了不影响业务,先没有排查该问题,而是尽快拉起r33ciq1进程,每次都如下操作:
目标端:
GGSCI (dbrac) 4> view param P43CIQ1
extract p43ciq1
rmthost 192.168.131.43, mgrport 7809
rmttrail /ggstrail/rmttrail/ciq/r1
passthru
GETTRUNCATES
dynamicresolution
table CCP.*;
table CIQPARA.*;
table GCC.*;
table IEED.*;
table PMS.*;
table EPCIQ.*;
table UIPEPDECL.*;
table YSBJ.*;
table YSPORTAL.*;
table EPCIQ.*;
该表复制了两次,所以导致出错。
停止相关进程,修改该复制进程,重启进程,问题就解决了。