OGG主从表结构不同步
作者:互联网
一、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 upcenter/vn2Ew1y38fIvN dumpfile=FUND_RETRUN_RANK.dump tables=FUND_RETRUN_RANK logfile=FUND_RETRUN_RANK.log directory=tong PARALLEL=8 #源端导出
impdp upcenter/NV1Wu8h2L8gv 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.*;
标签:同步,upcenter,RANK,repwh2,FUND,RETRUN,Oracle,OGG,主从 来源: https://www.cnblogs.com/williamzheng/p/11498472.html