*********************
goldengate 简单的配置
*********************
GRANT DBA TO wjlcn;
alter database add supplemental log data;
show parameter LOG_PARALLELISM
--如果参数值大于1必须改为1
create table ggstest (ggsid number,name char(20),telphoto char(13));
alter table ggstest add constraint pkkey primary key (ggsid);
源端:
1. 创建抽取进程
add extract ext2 tranlog,begin now
extract ext2
setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )
setenv ( ORACLE_SID=wjlcn)
userid wjlcn, password wjlcn
REPORT AT 01:59
reportrollover at 02:00
rmthost 10.230.17.243, mgrport 7809, compress
rmttrail /opt/ggs/dirdat/wj
numfiles 3000
dynamicresolution
--tranlogoptions rawdeviceoffset 0
warnlongtrans 2h, checkinterval 3m
FETCHOPTIONS NOUSESNAPSHOT
TRANLOGOPTIONS CONVERTUCS2CLOBS
table wjlcn.*
2.添加远端队列
add rmttrail /opt/ggs/dirdat/wj extract ext2 megabytes 100
3.开启表的最小附件日志
dblogin userid wjlcn,password wjlcn
add trandata wjlcn.*
4.start ext2
目标端:
1.创建投递进程
add replicat rep2 exttrail /opt/ggs/dirdat/wj,nodbcheckpoint
replicat rep2
setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )
setenv (ORACLE_SID=wjlcn)
userid wjlcn, password wjlcn
sqlexec "Alter session set constraints=deferred"
REPORT AT 01:59
reportrollover at 02:00
--handlecollisions
reperror default,abend
discardfile /opt/ggs/dirrpt/rep2.dsc,append, megabytes 10
assumetargetdefs
allownoopupdates
dynamicresolution
numfiles 3000
CHECKSEQUENCEVALUE
map wjlcn.* , target wjlcn.*;
2.start rep2
测试
insert、update、delete 操作都正常
must be two characters ???
#############################################################################
GGSCI (suse002b) 2> add rep rep2 exttrail /opt/ggs/dirdat/wjl,nodbcheckpoint
ERROR: EXTTRAIL file portion must be two characters.
GGSCI (suse002b) 3> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:08
GGSCI (suse002b) 4> add rep rep2 exttrail /opt/ggs/dirdat/wj,nodbcheckpoint
REPLICAT added.
##############################################################################
wjlcn 20110330
阅读(7149) | 评论(0) | 转发(0) |