当前位置: 首页 > GoldenGate > 正文
迁移OGG遇到OGG-00446错误
Mar282017
作者:dbdream 发布:2017-03-28 10:51 分类:GoldenGate 抢沙发
在一次迁移测试环境的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命令修改检查点信息就可以了,这里就不再演示了。
【上一篇】oracle数据库使用impdp导入数据时遇到ORA-39325错误
【下一篇】搭建ADG时遇到Heartbeat failed to connect to standby ‘XXXX’. Error is 16058错误
【下一篇】搭建ADG时遇到Heartbeat failed to connect to standby ‘XXXX’. Error is 16058错误