当前位置: 首页 > GoldenGate > 正文

迁移OGG遇到OGG-00446错误

在一次迁移测试环境的OGG时,忘了迁移目标端的OGG记录检查点信息的表(CHECKPOINTTABLE),在启动REPLICAT进程的时候,遇到了OGG-00446错误。

2017-03-23 15:14:31  ERROR   OGG-00446  Checkpoint table ogg.checkpointtable does not exist.  Please create the table or recreate the R_USR1 group using the correct table.

2017-03-23 15:14:31  ERROR   OGG-01668  PROCESS ABENDING.

这个问题解决起来比较简单,只要将这张表迁移过来即可,这种方法这里就不演示了,正好借这个环境模拟下CHECKPOINTTABLE丢失的情况下,怎么解决这样的问题。

在CHECKPOINTTABLE丢失的情况下,要启动REPLICAT进程需要先在数据库中创建出CHECKPOINTTABLE,CHECKPOINTTABLE的名字可以通过info命令查看到。

GGSCI (SL010A-ZT-UATDB01) 9> info R_USR1 DETAIL

REPLICAT   R_USR1    Last Started 2017-03-22 18:44   Status STOPPED
Checkpoint Lag       00:00:00 (updated unknown ago)
Log Read Checkpoint  File ./dirdat/u1000001
                     2017-03-23 23:01:41.363387  RBA 251738

  Extract Source                          Begin             End             

  ./dirdat/u1000001                       2017-03-22 18:44  2017-03-23 23:01
  ./dirdat/u1000000                       * Initialized *   2017-03-22 18:44

Current directory    /u01/app/oracle/ggs

Report file          /u01/app/oracle/ggs/dirrpt/R_USR1.rpt
Parameter file       /u01/app/oracle/ggs/dirprm/r_usr1.prm
Checkpoint file      /u01/app/oracle/ggs/dirchk/R_USR1.cpr
Checkpoint table     ogg.checkpointtable
Process file         /u01/app/oracle/ggs/dirpcs/R_USR1.pcr
Stdout file          /u01/app/oracle/ggs/dirout/R_USR1.out
Error log            /u01/app/oracle/ggs/ggserr.log

通过info命令查看到CHECKPOINTTABLE的名字后,通过dblogin连接到数据库,创建CHECKPOINTTABLE。

GGSCI (SL010A-ZT-UATDB01) 10> dblogin userid ogg,password 9oggSync866
Successfully logged into database.

GGSCI (SL010A-ZT-UATDB01) 11> ADD CHECKPOINTTABLE ogg.checkpointtable

Successfully created checkpoint table ogg.checkpointtable.

CHECKPOINTTABLE虽然创建了,这时启动REPLICAT进程还会遇到OGG-00446错误。通常OGG的错误号代表的是一系列的错误,可能遇到相同的错误号,但是错误信息完全不一样。

GSCI (SL010A-ZT-UATDB01) 13> start R_USR1

Sending START request to MANAGER ...
REPLICAT R_USR1 starting

GGSCI (SL010A-ZT-UATDB01) 14> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    STOPPED     R_USR1      00:00:00      unknown     
REPLICAT    STOPPED     R_USR2      00:00:00      unknown     
REPLICAT    STOPPED     R_USR3      00:00:00      unknown     
REPLICAT    STOPPED     R_USR4      00:00:00      unknown     
REPLICAT    STOPPED     R_USR5      00:00:00      unknown     
REPLICAT    STOPPED     R_USR6      00:00:00      unknown     
REPLICAT    STOPPED     R_USRA      00:00:00      unknown     
REPLICAT    STOPPED     R_USRB      00:00:00      unknown     

2017-03-23 15:26:39  ERROR   OGG-00446  No data selecting position from checkpoint table ogg.checkpointtable for group 'R_USR1', key 2152597802 (0x804e092a), SQL <SELEC
T a.current_dir, a.seqno, a.rba, a.audit_ts, a.log_csn, a.log_xid, a.log_cmplt_csn, a.log_cmplt_xids, b.log_cmplt_xids FROM ogg.checkpointtable a LEFT JOIN ogg.checkpoi
nttable_lox b ON a.group_name = b.group_name AND a.group_key = b.group_key AND a.log_cmplt_csn = b.log_cmplt_csn WHERE a.group_name = 'R_USR1' AND a.group_key  = 215259
7802>.

2017-03-23 15:26:39  ERROR   OGG-01668  PROCESS ABENDING.

这是因为CHECKPOINTTABLE中还没有这个进程的相关检查点信息,启动进程的时候找不到需要从哪开始,就遇到了上面的错误,这时需要通过alter命令为进程指定检查点信息,也就是告诉进程从哪开始干活。检查点的信息可以通过info命令查到。

GGSCI (SL010A-ZT-UATDB01) 16> info R_USR1

REPLICAT   R_USR1    Last Started 2017-03-22 18:44   Status STOPPED
Checkpoint Lag       00:00:00 (updated unknown ago)
Log Read Checkpoint  File ./dirdat/u1000001
                     2017-03-23 23:01:41.363387  RBA 251738

通过上面的信息可以看到,目前R_USR1进程正工作在1号trail文件,RBA为251738,通过alter命令对这个进程的检查点信息进行修改。

GGSCI (SL010A-ZT-UATDB01) 19> alter REPLICAT R_USR1,extseqno 1,extrba 251738
REPLICAT altered.

这样CHECKPOINTTABLE就会记录这个进程的检查点信息,这时就可以成功启动这个进程了。

GGSCI (SL010A-ZT-UATDB01) 20> start R_USR1

Sending START request to MANAGER ...
REPLICAT R_USR1 starting


GGSCI (SL010A-ZT-UATDB01) 21> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    RUNNING     R_USR1      00:00:00      00:00:08    
REPLICAT    STOPPED     R_USR2      00:00:00      unknown     
REPLICAT    STOPPED     R_USR3      00:00:00      unknown     
REPLICAT    STOPPED     R_USR4      00:00:00      unknown     
REPLICAT    STOPPED     R_USR5      00:00:00      unknown     
REPLICAT    STOPPED     R_USR6      00:00:00      unknown     
REPLICAT    STOPPED     R_USRA      00:00:00      unknown     
REPLICAT    STOPPED     R_USRB      00:00:00      unknown     

其他进程就不需要再创建CHECKPOINTTABLE了,只需要使用alter命令修改检查点信息就可以了,这里就不再演示了。

本文固定链接: https://www.dbdream.com.cn/2017/03/%e8%bf%81%e7%a7%bbogg%e9%81%87%e5%88%b0ogg-00446%e9%94%99%e8%af%af/ | 信春哥,系统稳,闭眼上线不回滚!

该日志由 dbdream 于2017年03月28日发表在 GoldenGate 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: 迁移OGG遇到OGG-00446错误 | 信春哥,系统稳,闭眼上线不回滚!
关键字: , ,

迁移OGG遇到OGG-00446错误:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter