./ggsci
GGSCI (sdbmzdb2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED DPEB 00:00:00 01:58:22
EXTRACT RUNNING EXTB 00:00:00 00:00:06
GGSCI (sdbmzdb2) 13> view report dpeb
发现如下错误:
2012-12-12 15:58:36 ERROR OGG-01031 There is a problem in network communication, a remote file problem, encryption keys for target and source do not match (if usin
g ENCRYPT) or an unknown error. (Reply received is Unable to open file "/home/ogg/dirdat/rb003373" (error 11, Resource temporarily unavailable)).
源端有个文件,,,rb00373那个文件,在目标端会有个对应的文件,,,这个对应的文件由于,源端机器重启了,,,造成两个文件间的信息不匹配了,,,
GGSCI (sdbmzdb2) 2> alter extract dpeb etrollover
2012-12-12 16:12:34 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically.
EXTRACT altered.
再次传送373这个文件到目标端,,,生成新的文件。。。
GGSCI (sdbmzdb2) 2> stop mgr
GGSCI (sdbmzdb2) 2> stop dpeb
GGSCI (sdbmzdb2) 2> stop extb
GGSCI (sdbmzdb2) 2> start mgr
GGSCI (sdbmzdb2) 2> start dpeb
GGSCI (sdbmzdb2) 2> start extb
源端也进行重启查看源端日志
vi /home/ogg/ggserr.log
2012-12-12 18:38:43 WARNING OGG-01519 Oracle GoldenGate Delivery for Oracle, repb.prm: Waiting at EOF on input trail file /home/ogg/dirdat/rb003373, which is not marked as complete; but succeeding trail file /home/ogg/dirdat/rb003374 exists. If ALTER ETROLLOVER has been performed on source extract, ALTER EXTSEQNO must be performed on each corresponding downstream reader.
这样新生成的 003374文件 并没有被ogg识别,这种情况下 需要命令让ogg识别新生成的3374文件
在目的端 首先停止 repb进行
GGSCI (sdbmzbb) 31> >stop repb
GGSCI (sdbmzbb) 31> >alter replicat repb extseqno 3374 extrba 0.
重新启动repb
GGSCI (sdbmzbb) 31> >start repb
查看日志:
2012-12-12 18:42:05 INFO OGG-01020 Oracle GoldenGate Delivery for Oracle, repb.prm: Processed extract process RESTART_ABEND record at seq 3374, rba 1029 (aborted 0 records).
则同步成功!
在清理表过程中,由于arch目录慢 ,在没有备份的情况下,删除archlog日志 导致
源端出现 extb抽取进程挂起,查看ggserr。log 发现
- 2013-05-08 03:11:38 ERROR OGG-00446 Oracle GoldenGate Capture for Oracle, extb.prm: Could not find archived log for sequence 3045 thread 1 under alternative or default destinations. SQL <SELECT name FROM v$archived_log WHERE sequence# = :ora_seq_no AND thread# = :ora_thread AND resetlogs_id = :ora_resetlog_id AND archived = 'YES' AND deleted = 'NO' AND standby_dest = 'NO' order by name DESC>. Last alternative log tried /home/arch1/1_3045_784158808.dbf., error retrieving redo file name for sequence 3045, archived = 1, use_alternate = 0Not able to establish initial position for sequence 3045, rba 254007312.
在 源端 执行
GGSCI (sdbmzdb2) 2> alter extract extb begin ,now
使抽取进程重新开始