首页 » OGG » goldengate update collisions

goldengate update collisions

今天 开发的反应OGG同步有两个表同步有点问题,主库只有两张表更新从库未变表中未同步
db version :10gr2
ogg version:11r2

排查未同步的问题可以这样
1,各进程是否运行 info all,
2,日志文件是否有错 tail -f $OGG_HOME/ggserr.log,
3,看extract 进程有没有捕捉到表上的更新 stats ext eicme4c
4,datapump extract有没有把数据传送过去,stats ext eticme4
5,分析trail 文件中有没有操作
Logdump 3 >open ./dirdat/l2000013
Current LogTrail is /oracle/ogg11r2/dirdat/l2000013
Logdump 4 >ghdr on
Logdump 8 >count detail
6,查看replicat进程有没有应用 stats rep ricme4, table icme_noproject_score

GGSCI (matrix) 2> stats rep ricme4
.--摘
Replicating from ICME4.ICME_NOPROJECT_SCORE to ICME4.ICME_NOPROJECT_SCORE:
*** Total statistics since 2012-10-16 10:55:56 ***
        Total inserts                                      1.00
        Total updates                                     12.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                  13.00
        Total update collisions                           12.00

Replicating from ICME4.ICME_NOPROJECT_SCORE to ICME4.ICME_NOPROJECT_SCORE:

*** Total statistics since 2012-10-18 11:16:28 ***
        Total inserts                                      0.00
        Total updates                                      0.00
        Total deletes                                      1.00
        Total discards                                     0.00
        Total operations                                   1.00

发现insert ,delete都没有问题,而之有UPDATE更新出错被忽略了,怀疑表级日志没有填加
select * from user_log_groups 查询后发现果然表上没有日志,而且表上有主键,如果只在源库开启minimal模式的supplemental logging,而且不在表级增加日志的话,redo 中不会记录主键的值,ogg在同步时就无法找到匹配的值

解决
GGSCI (dev-db) 10> dblogin userid oggmgr, password 121212
Successfully logged into database.

GGSCI (dev-db) 11> add trandata icme4.icme_noproject_score

再次同步就可以了

开始我怀疑是通过rowid更新的后来测试,如果有主键和表级日志,通过sql where 条优中通过rowid更新也是可以同步的,而且表上如果没有主键没有表级日志更新会出现错误,还有可能根据update Image产生一条insert.

打赏

目前这篇文章有1条评论(Rss)评论关闭。

  1. Cheap Air Yeezy | #1
    2012-10-19 at 10:26

    Howdy very cool website!! Man .. Beautiful .. Wonderful .. I will bookmark your website and take the feeds alsoI’m glad to find a lot of useful info here within the publish, we want develop more techniques in this regard, thanks for sharing. . . . . .