检查DiscardFile 记录
OCI Error ORA-00001: unique constraint (CAI.CAI2_PK) violated (status = 1). INSERT INTO "CAI"."CAI2" ("ID","NAME","SEX") VALUES (:a0,:
a1,:a2)
Aborting transaction on /oracle/ogg/dirdat/lt beginning at seqno 0 rba 5090
error at seqno 0 rba 5090
查看信息
[oracle@slave ogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 10g on Apr 23 2012 07:30:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (slave) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT ABENDED IMP1 00:06:22 03:21:36
GGSCI (slave) 3> info replicat imp1
REPLICAT IMP1 Last Started 2013-11-19 21:06 Status ABENDED
Checkpoint Lag 00:06:22 (updated 03:22:28 ago)
Log Read Checkpoint File /oracle/ogg/dirdat/lt000000 replicat进程应用到RBA 5090的时候出错了
2013-11-19 20:59:21.983643 RBA 5090
直接用logdump工具来定位下一条记录的,跳过这个错误的事务
[oracle@slave ogg]$ ./logdump
Oracle GoldenGate Log File Dump Utility for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Logdump 4 >open dirdat/lt000000
Current LogTrail is /oracle/ogg/dirdat/lt000000
Logdump 5 >post 5090
sh: post: command not found
Logdump 6 >pos 5090
Reading forward from RBA 5090
Logdump 7 >n
2013/11/19 21:00:54.887.896 Insert Len 37 RBA 5090 //insert 语句 表名是CAI.CAI2
Name: CAI.CAI2
After Image: Partition 4 G s
0000 0005 0000 0001 3500 0100 0d00 0000 0964 6174 | ........5........dat
6167 7561 7264 0002 0007 0000 0003 e794 b7 | aguard...........
Logdump 8 >n
2013/11/19 21:01:32.910.526 Insert Len 37 RBA 5235
Name: CAI.CAI2
After Image: Partition 4 G s
0000 0005 0000 0001 3600 0100 0d00 0000 0964 6174 | ........6........dat
6167 7561 7264 0002 0007 0000 0003 e794 b7 | aguard...........
Logdump 9 >exit
然后设置rba,启动进程
GGSCI (slave) 5> alter replicat imp1 , extrba 5235
REPLICAT altered.
GGSCI (slave) 6> start imp1
Sending START request to MANAGER ...
REPLICAT IMP1 starting
如果后续还出错,那么就退回logdump,继续next!!!
#########################
迷途小运维随笔
作者:john
转载请注明出处