码迷,mamicode.com
首页 > 其他好文 > 详细

OGG主从表结构不同步,出现OGG-01296错误

时间:2019-09-10 17:45:56      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:主键   ppi   golden   file   tables   new t   oracl   update   fun   

一、Cause

ogg日志出现以下报错

2019-09-10 16:36:55  WARNING OGG-01003  Oracle GoldenGate Delivery for Oracle, repwh2.prm:  Repositioning to rba 1720271212 in seqno 1521.
2019-09-10 16:36:55  ERROR   OGG-01296  Oracle GoldenGate Delivery for Oracle, repwh2.prm:  Error mapping from UPCENTER.FUND_BOND_INVEST_PORT_NEW to UPCENTER.FUND_BOND_INVEST_PORT_NEW.
2019-09-10 16:36:55  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle, repwh2.prm:  PROCESS ABENDING.

由于表没有添加主键或修改主键或者没有添加补充日志或者导入大量clob字段等等原因,在ogg日志里看到有表同步报错,此时需要在ogg源端里过滤不同步的表,然后解决掉问题或者手工同步表到目标端,再在目标端里取消过滤

二、解决办法

2.1过滤不同步的表

GGSCI (ogg2) 2> edit params repwh2
replicat repwh2
ASSUMETARGETDEFS
dynamicresolution
ALLOWNOOPUPDATES
userid ggs,password mEkxcl9DN
discardfile /u01/gglog/repwh_discard.txt,append,megabytes 500
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE RETRYOP
TABLEEXCLUDE UPCENTER.HK_SSTEN_DEAL1
TABLEEXCLUDE UPCENTER.STK_INDU_NAME_TEMP    #过滤不同步的表,重启进程
map upcenter.*,target upcenter.*;
GGSCI (ogg2) 2> start repwh2

2.2将主库的数据导入到从库

源端导出

expdp 用户名/密码 dumpfile=FUND_RETRUN_RANK.dump tables=FUND_RETRUN_RANK logfile=FUND_RETRUN_RANK.log directory=tong PARALLEL=8

目标端导入

impdp 用户名/密码 tables=FUND_RETRUN_RANK dumpfile=FUND_RETRUN_RANK.dump directory=tong logfile=FUND_RETRUN_RANK.log TABLE_EXISTS_ACTION=REPLACE

2.3在从库OGG进程放行过滤的表

GGSCI (ogg2) 2> edit params repwh2
replicat repwh2
ASSUMETARGETDEFS
dynamicresolution
ALLOWNOOPUPDATES
userid ggs,password mEkxcl9DN
discardfile /u01/gglog/repwh_discard.txt,append,megabytes 500
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE RETRYOP
TABLEEXCLUDE UPCENTER.HK_SSTEN_DEAL1
TABLEEXCLUDE UPCENTER.STK_INDU_NAME_TEMP    #将这行去掉
map upcenter.*,target upcenter.*;

OGG主从表结构不同步,出现OGG-01296错误

标签:主键   ppi   golden   file   tables   new t   oracl   update   fun   

原文地址:https://www.cnblogs.com/williamzheng/p/11498472.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!