说明:本文为Oracle Goldengate etrollover操作概要
温馨提示:如果您发现本文哪里写的有问题或者有更好的写法请留言或私信我进行修改优化
★ OGG异常提示
OGG-01476: The previous run abended due to an out of order transaction. Issue
ALTER ETROLLOVER to advance the output trail sequence past the current trail
sequence number, then restart. Then, use ALTER EXTSEQNO on the
subsequent pump EXTRACT, or REPLICAT, process group to start reading from
the new trail file created by ALTER ETROLLOVER; the downstream process will
not automatically switch to the new trail file.
Cause: Somehow, the transactions in the current trail file are out of order. A different
Extract might have been configured to write to this trail, and old data was overlaid with
the new data. You will need to skip this record, and then reposition Replicat to start at
the next one.
Action: Stop the Extract that should write to this trail, then issue the ALTER EXTRACT
command with ETROLLOVER . Next, restart Extract. Next, issue the ALTER REPLICAT or
ALTER EXTRACT command (depending on whether Replicat or a data pump Extract
reads the trail) with the EXTSEQNO option and specify the sequence number of the new
trail file. Finally, start Replicat or the data pump.
★ etrollover功能
OGG中可以使用etrollover重新生成新的队列文件,一般常用于升级或文件写异常后生成一个新的trail文件
★ 源端情况
GGSCI (rac1) 6> info ex_scott,detail
EXTRACT EX_SCOTT Last Started 2020-02-21 15:09 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Process ID 5098
Log Read Checkpoint Oracle Redo Logs
2020-04-03 10:19:45 Seqno 17, RBA 31784960
SCN 0.1133985 (1133985)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/ogg123/dirdat/es 3 1408 200 EXTTRAIL
※ 注释:抓取进程文件前缀(es);抓取进程当前生产的trail文件序号(Seqno:3)和当前指针在文件中的位置(RBA:1408)
GGSCI (rac1) 8> info pu_scott,detail
EXTRACT PU_SCOTT Last Started 2020-02-25 08:36 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:00 ago)
Process ID 5887
Log Read Checkpoint File /ogg123/dirdat/es000000003
First Record RBA 1408
※ 注释:传输进程读取抓取进程生成的trail文件前缀(es),文件序号(Seqno:3),当前指针在文件中的位置(RBA:1408)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/ogg123/dirdat/ps 4 1475 200 RMTTRAIL
※ 注释:传输进程投递到目标端的trail文件前缀(ps),文件序号(Seqno:4),当前指针在文件中的位置(RBA:1475)
★ 执行ETROLLOVER
※ 注意事项:在配置进程前,进程中不能含(batchsql、grouptransops、maxtransops)这些优化参数以免引起指针跳跃
※ 温馨提示:修改后拉起相关进程即可
※ 抓取进程(源端)
stop ex_scott
alter ex_scott,etrollover
※ 传输进程(源端)
stop pu_scott 【等待一段时间,等之前抓取进程的数据都传输完后再停止(可用:logdump或lag等进行查看是否结束)】
alter pu_scott,etrollover 【等stop后再进行etrollover操作】
alter pu_scott,extseqno 4,extrba 0 【将extseqno指定为检查点的序号+1,该例为:3+1=4,生产按实际情况修改】
※ 复制进程(目标端)
stop re_scott 【等待一段时间,等之前传输进程的数据都复制完后再停止(可用:logdump或lag等进行查看),再进行alter操作】
alter re_scott,extseqno 5,extrba 0 【将extseqno指定为etrollover之前的序号+1,该例为:4+1=5,生产按实际情况修改】
over