ERROR OGG-01168使用allownoopupdates参数解决

(一)
报错概述:
gg 数据同步的 SCHEMA 下一张table 主备同步, 当在source 操作时(expdp 导出一张表时),此时 target , replicat abended 掉。

(二)
以下下是报错信息:(target 端)

GGSCI (dominic.mysql2) 65> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
REPLICAT    ABENDED     REP_1       00:00:15      00:18:16   

(三)
异常 端的 ggserr.log 日志, 以及 rep_1 日志:

GGSCI >  view report ggserr.log 
 GGSCI >  view report rep_1


 015-01-17 18:10:10  ERROR   OGG-01168  Encountered an update for target table SCOTT.SYS_EXPORT_TABLE_01, which has no unique ke
y defined.  KEYCOLS can be used to define a key.  Use ALLOWNOOPUPDATES to process the update without applying it to the target d
atabase.  Use APPLYNOOPUPDATES to force the update to be applied using all columns in both the SET and WHERE clause.

***********************************************************************
*                   ** Run Time Statistics **                         *
***********************************************************************

Reading /dba/ogg/dirdat/tt000002, current RBA 60636, 14 records

Report at 2015-01-17 18:10:10 (activity since 2015-01-17 18:10:10)

From Table SCOTT.SYS_EXPORT_TABLE_01 to SCOTT.SYS_EXPORT_TABLE_01:
       #                   inserts:        14
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         1


DDL replication statistics:

                    Operations:         0
             Mapped operations:         0
           Unmapped operations:         0
              Other operations:         0
           Excluded operations:         0
                        Errors:         0
                Retried errors:         0
              Discarded errors:         0
                Ignored errors:         0


Last log location read:
     FILE:      /dba/ogg/dirdat/tt000002
     SEQNO:     2
     RBA:       60636
     TIMESTAMP: 2015-01-17 18:08:26.285002
     EOF:       NO
     READERR:   0


2015-01-17 18:10:10  ERROR   OGG-01668  PROCESS ABENDING.

CACHE OBJECT MANAGER statistics

CACHE MANAGER VM USAGE
vm current     =      0    vm anon queues =      0
vm anon in use =      0    vm file        =      0
vm used max    =      0    ==> CACHE BALANCED

CACHE CONFIGURATION
cache size            =   2G   cache force paging = 3.41G
buffer min            =  64K   buffer max (soft)  =   8M
pageout eligible size =   8M

(四) 解决办法:
通过ggserr.log 日志内容,添加参数: applynoopupadtes

015-01-17 18:10:10 ERROR OGG-01168 Encountered an update for
target table SCOTT.SYS_EXPORT_TABLE_01, which has no unique ke y
defined. KEYCOLS can be used to define a key. Use ALLOWNOOPUPDATES
to process the update without applying it to the target d atabase.
Use APPLYNOOPUPDATES to force the update to be applied using all
columns in both the SET and WHERE clause.

GGSCI (dominic.mysql2 as ogg@mysql1) 38> view params rep_1
replicat rep_1
userid ogg,password ogg
assumetargetdefs
reperror default,discard 
discardfile /dba/ogg/dirrpt/rep_1.dsc, append , megabytes 50
dynamicresolution
APPLYNOOPUPDATES
ddl include mapped
ddloptions report
map scott.*,target scott.*;


GGSCI (dominic.mysql2 as ogg@mysql1) 36> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING                                           
REPLICAT    RUNNING     REP_1       00:00:00      00:00:06  

测试: SOURCE DB , TARGET DB 可以同步了!

解释:
allownoopupdates : 允许执行无实际变化的update, eg: update a=a 会记录一条update, 但是没有后影像,无法正确构建where 语句。