- 最后登录
- 2019-7-8
- 在线时间
- 133 小时
- 威望
- 131
- 金钱
- 1368
- 注册时间
- 2011-10-14
- 阅读权限
- 50
- 帖子
- 126
- 精华
- 1
- 积分
- 131
- UID
- 31
|
1#
发表于 2013-4-15 15:16:19
|
查看: 6104 |
回复: 3
gg version:Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
db:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
os:Red Hat Enterprise Linux Server release 6.0
目标端与源端的环境一致
extract参数- GGSCI (ogg1) 2> view params EXMA1
- extract exma1
- SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
- userid ogg_source ,password AADAAAAAAAAAAADAPBWBXBLIQCCAYDPDTCRHNBSHTGHIVDQDLDUENJHHMCSEWDLECINGACXBJERHZEFD &
- AES128,ENCRYPTKEY mykey1
- TRANLOGOPTIONS INCLUDEREGIONID ALTARCHIVELOGDEST PRIMARY /home/oracle/app/oradata/arch
- EXTTRAIL /home/oracle/ogg/dirdat/m1
- table clm.ma*,&
- GETBEFORECOLS ( &
- ON UPDATE ALL,&
- ON DELETE ALL) &
- ;
复制代码 pump参数- GGSCI (ogg1) 4> view params EXPMMA2
- EXTRACT expmma2
- REPORT AT 11:30
- REPORTROLLOVER AT 17:00
- USERID ogg_source, password AADAAAAAAAAAAADAPBWBXBLIQCCAYDPDTCRHNBSHTGHIVDQDLDUENJHHMCSEWDLECINGACXBJERHZEFD &
- AES128,ENCRYPTKEY mykey1
- DISCARDFILE /home/oracle/ogg/dirdat/disc_ma2.dis, append,megabytes 100
- RMTHOST 192.168.146.11, MGRPORT 7809 ,ENCRYPT AES128, KEYNAME mykey2
- ENCRYPTTRAIL AES128 KEYNAME mykey3
- RMTTRAIL /home/oracle/ogg/dirdat/m2
- TABLE clm.MAP_TAB,COLSEXCEPT(update_time);
- --,&
- --GETBEFORECOLS ( &
- --ON UPDATE KEYINCLUDING (name, age), &
- --ON DELETE KEYINCLUDING (name, age));
复制代码 replicat参数- GGSCI (ogg2) 69> view params REMP1
- REPLICAT remp1
- --CHECKPARAMS
- SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
- USERID ogg_target, PASSWORD ogg
- REPORT AT 11:30
- REPORTROLLOVER AT 17:00
- STATOPTIONS REPORTDETAIL RESETREPORTSTATS
- sqlexec "Alter session set constraints=deferred"
- ---DBOPTIONS limitrows SUPPRESSTRIGGERS DEFERREFCONST
- ---DDLOPTIONS REPORT
- ---ASSUMETARGETDEFS
- ---REPERROR (DEFAULT, DISCARD)
- ---DDLERROR DEFAULT DISCARD RETRYOP
- DECRYPTTRAIL AES128 KEYNAME mykey3
- DISCARDFILE /home/oracle/ogg/disc_mp1,append, megabytes 100
- SOURCEDEFS /home/oracle/ogg/dirdef/map.df
- map clm.map_tab, target clm_target.map_tab_log, &
- KEYCOLS (id), &
- SQLEXEC(id env,query "select SYS_CONTEXT('USERENV','TERMINAL') terminal, sys.login_user username,SYS_CONTEXT('USERENV','HOST') hostn
- ame,SYS_CONTEXT('USERENV','DB_NAME') dbname from dual",EXEC SOURCEROW), &
- colmap (USEDEFAULTS, &
- identity_card_en = IDENTITY_CARD, &
- oper_time = @GETENV ("GGHEADER", "COMMITTIMESTAMP"), &
- OPER_NAME = env.username , &
- oper_ip = "test", &
- oper_optype = @GETENV("GGHEADER", "OPTYPE") &
- op_dname = env.dbname, &
- op_terminal = env.terminal &
- ), &
- COMPARECOLS ( &
- ON UPDATE KEYINCLUDING (name, age), &
- ON DELETE KEYINCLUDING (name, age)), &
- RESOLVECONFLICT (UPDATEROWEXISTS, (DEFAULT, USEMAX(age))), &
- RESOLVECONFLICT (INSERTROWEXISTS, (DEFAULT, USEMAX(age))), &
- RESOLVECONFLICT (DELETEROWEXISTS, (DEFAULT, OVERWRITE)), &
- RESOLVECONFLICT (UPDATEROWMISSING, (DEFAULT, OVERWRITE)), &
- RESOLVECONFLICT (DELETEROWMISSING, (DEFAULT, DISCARD)), &
- ----REPERROR DISCARD, &
- where (id=1),&
- EVENTACTIONS ( SHELL ("Timestamp: $1 > /home/oracle/id=1log.txt ", VAR $1 = @GETENV("JULIANTIMESTAMP")),&
- FILTER( IGNORE UPDATE, IGNORE DELETE,(area="yantai"))
- ;
复制代码 现在的现象是,insert进去没有问题,但是当update的时候replicat直接abend
2007-08-08 11:57:01 ERROR OGG-01921 Missing GETBEFORECOLS with conflict detection enabled in target table CLM_TARGET.MAP_TAB_LOG
.
不知道那个地方配置出问题了,多谢解答 |
|