问题描述:ogg源端投递进程告警OGG-01496、OGG-01668,如下所示:
源 端:oracle 10.2.0.4 64位 + oel 5.11 64位
目 标 端:oracle 19.16 64位 + centos 7.9 64位
1、异常重现
GGSCI (leo-10g-ogg) 4> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT ABENDED DP1 00:00:00 00:15:46
EXTRACT RUNNING EXTA 00:00:00 00:00:06

2022-12-11 15:43:03 INFO OGG-01226 Socket buffer size set to 27985 (flush size 27985).

Source Context :
SourceModule : [er.recovery]
SourceID : [/scratch/sganti/view_storage/sganti_core_lin64/oggcore/OpenSys/src/app/er/recovery.c]
SourceFunction : [RECOVERY_initialize]
SourceLine : [1712]
ThreadBacktrace : [7] elements
: [/u01/app/ogg/extract(CMessageContext::AddThreadContext()+0x26) [0x661466]]
: [/u01/app/ogg/extract(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x657f32]]
: [/u01/app/ogg/extract(_MSG_ERR_RECOVERY_OPEN_FAILED(CSourceContext*, char const*, int, CMessageFactory::MessageDisposition)+0x9b) [0x64235b]]
: [/u01/app/ogg/extract(RECOVERY_initialize()+0x350) [0x50f7d0]]
: [/u01/app/ogg/extract(main+0x7dc) [0x5252bc]]
: [/lib64/libc.so.6(__libc_start_main+0xf4) [0x3c4701d9f4]]
: [/u01/app/ogg/extract(__gxx_personality_v0+0x1f2) [0x4f23ba]]

2022-12-11 15:43:03 ERROR OGG-01496 Failed to open target trail file ./dirdat/ra000002, at RBA 20660.

2022-12-11 15:43:03 ERROR OGG-01668 PROCESS ABENDING.

2、异常原因
目标端trail文件丢失,查看$OGG_HOME/dirdat下确实没有文件存在.
3、解决方案
--源端执行
GGSCI (leo-10g-ogg) 6> dblogin userid ogg@ORCL,password ogg
Successfully logged into database.

GGSCI (leo-10g-ogg) 7> stop dp1
EXTRACT DP1 is already stopped.


GGSCI (leo-10g-ogg) 8> alter extract dp1 etrollover

2022-12-11 15:57:55 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.

说明:ETROLLOVER作用为前滚重新生成一个新的队列文件,注意只能在对应的EXTRACT停止后执行该命令.

--目标端执行
GGSCI (leo-19c-ogg) 8> dblogin userid ogg@SIMDB,password ogg
Successfully logged into database.

GGSCI (leo-19c-ogg as ogg@simdb) 9> stop rep1

Sending STOP request to REPLICAT REP1 ...
Request processed.
--目标端修改复制进程trial文件
GGSCI (leo-19c-ogg as ogg@simdb) 10> alter replicat rep1 extseqno 000003, extrba 0

2022-12-11 16:01:55 INFO OGG-06594 Replicat REP1 has been altered. Even the start up position might be updated, duplicate suppression remains active in next startup. To override duplicate suppression, start REP1 with NOFILTERDUPTRANSACTIONS option.

REPLICAT altered.

说明:“000003”根据报错信息“000002”加1所得.
GGSCI (leo-19c-ogg as ogg@simdb) 11> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
REPLICAT STOPPED REP1 00:00:00 00:00:13

--源端启动投递进程
GGSCI (leo-10g-ogg) 10> start dp1

Sending START request to MANAGER ...
EXTRACT DP1 starting

GGSCI (leo-10g-ogg) 11> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING
EXTRACT RUNNING DP1 00:00:00 00:04:30
EXTRACT RUNNING EXTA 00:00:00 00:00:05
--目标端启动应用进程
GGSCI (leo-19c-ogg as ogg@simdb) 12> start rep1

Sending START request to MANAGER ...
REPLICAT REP1 starting

GGSCI (leo-19c-ogg as ogg@simdb) 13> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING
REPLICAT RUNNING REP1 00:20:45 00:00:00
[oracle@leo-19c-ogg dirdat]$ pwd
/u01/app/ogg/dirdat
[oracle@leo-19c-ogg dirdat]$ ll
total 4
-rw-r----- 1 oracle oinstall 1195 Dec 11 16:02 ra000003

说明:目标端trail文件重新生成.

参考文档:
https://blog.csdn.net/L1048805945/article/details/122324700
https://blog.csdn.net/sunliming99/article/details/90080967