ORACLEOGG参数修改引起队列⽂件异常导致抽取进程⽆法
启动
白水江今天⼀同事做oracle ogg到mysql的数据同步搭建,出现ogg的抽取进程⽆法启动问题。经过⼀番排查,发现ogg同⼀个队列⽂件,抽取进程使⽤了不同的参数启动,引起抽取队列⽂件异常导致抽取进程⽆法启动。
⼀、问题现象
OGG配置搭建的过程中,多次尝试重启OGG抽取进程,⼀直处于abend状态。
GGSCI (orclogg as OGG@orclogg) 76> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT ABENDED E1 00:00:00 01:53:13
EXTRACT ABENDED P1 00:00:00 01:49:23
EXTRACT STOPPED PUMP_001 00:00:00 01:03:19
EXTRACT STOPPED REP_001 00:00:00 01:03:14
海珠区实验小学⼆、问题分析
查看抽取进程E1的⽇志,有时候E1的⽇志会很长,建议重新启动⼀次,⽅便查看错误⽇志。
2022-01-18 15:16:24 INFO OGG-01516 Positioned to (Thread 1) Sequence 79, RBA 915761680, SCN 0.0 (0), 2022 M01 18 15:16:04.
Source Context :
海南省见证取样工作网SourceModule : [very]
SourceID : [/scratch/aime/adestore/views/aime_adc00jza/oggcore/OpenSys/src/app/er/extract/extrecovery.cpp]
SourceMethod : [recParLastCommitPos]
SourceLine : [452]
唇膜怎么用什么东西化痰ThreadBacktrace : [12] elements
: [/home/oracle/goldengate/ogg/oggsoft2/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/home/oracle/goldengate/ogg/oggsoft2/extract(_ZN3ggs5gglib14MultiThreading10MainThread3RunEiPPc+0xb5) [0x83e875]]
:
小孩多动症有什么症状表现
[/home/oracle/goldengate/ogg/oggsoft2/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/home/oracle/goldengate/ogg/oggsoft2/extract()]
: [/home/oracle/goldengate/ogg/oggsoft2/extract(_ZN3ggs5gglib14MultiThreading10MainThread3RunEiPPc+0xb5) [0x83e875]]
: [/home/oracle/goldengate/ogg/oggsoft2/extract()]
: [/home/oracle/goldengate/ogg/oggsoft2/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
:
[/home/oracle/goldengate/ogg/oggsoft2/extract(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/home/oracle/goldengate/ogg/oggsoft2/extract(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/home/oracle/goldengate/ogg/oggsoft2/extract(main)]
: [/home/oracle/goldengate/ogg/oggsoft2/extract()]
: [/home/oracle/goldengate/ogg/oggsoft2/extract()]
2022-01-18 15:16:24 ERROR OGG-06601 Mismatch between the length of qno from checkpoint (6) and recovery (9) for extract trail
/home/oracle/goldengate/ogg/oggsoft2/dirdat/e1.
2022-01-18 15:16:24 INFO OGG-01517 Position of first record procesd for Thread 1, Sequence 79, RBA 915761680, SCN 0.15107058 (15107058), 2022 M01 18 15:16:14.
2022-01-18 15:16:24 ERROR OGG-01668 PROCESS ABENDING.
⽇志中的关键错误信息:ERROR OGG-06601 Mismatch between the length of qno from checkpoint (6) and recovery (9) for extract trail /home/oracle/goldengate/ogg/oggsoft2/dirdat/e1.由⽇志信息可以看
出/home/oracle/goldengate/ogg/oggsoft2/dirdat/e1队列⽂件在多次重启过程中,已经出现了不⼀致⽽且⽆法恢复的情况。经过沟通得知,同事是初步配置搭建OGG,过程中多次修改OGG抽取进程的参数,起初抽取进程可以运⾏,后来abend之后⽆法成功启动。根据报错⽇志提⽰,需要删除队列⽂件/home/oracle/goldengate/ogg/oggsoft2/dirdat/e1,设置抽取进程从当前位置开始抽取,并重启抽取进程。
三、问题处理
克己复礼的意思
--删除队列⽂件
rm -rf /home/oracle/goldengate/ogg/oggsoft2/dirdat/e1
--设置抽取进程e1从当前redo当前位置开始抽取
GGSCI (orclogg as OGG@orclogg) 82> alter extract E1 begin now;
EXTRACT altered.
--重启抽取进程
GGSCI (orclogg as OGG@orclogg) 83> start E1
Sending START request to MANAGER ...
EXTRACT E1 starting
--查看抽取进程E1的状态
GGSCI (orclogg as OGG@orclogg) 84> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
鲫鱼煲汤EXTRACT RUNNING E1 00:00:00 00:00:12
EXTRACT ABENDED P1 00:00:00 01:55:47
EXTRACT RUNNING PUMP_001 00:00:00 00:00:07
EXTRACT RUNNING REP_001 00:00:00 00:00:06
四、总结
在做OGG数据迁移或者数据同步之前,建议先对OGG的理论知识做学习,对OGG有初步的了解,并在配置过程中通过metalink官⽅⽹站查找问题及问题处理过程。