1. 配置源端GoldenGate
>delete extract eini_1
./ggsci
>dblogin userid ogg,password ufsoft
>edit params mgr
//编辑管理进程
PORT 7809
>start mgr
>edit params GLOBALS
GGSCHEMA ogg
>edit extract eini_1
EXTRACT EINI_1
dynamicresolution
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg PASSWORD ufsoft
RMTHOST 192.168.0.4,MGRPORT 7809
TRANLOGOPTIONS EXCLUDEUSER ogg
exttrail /oracle/goldengate/dirdat/la
DDL INCLUDE ALL
table scott.*;
>add extract eini_1,tranlog,begin now
>add extract eini_1,tranlog,begin now
>add exttrail /oracle/goldengate/dirdat/la,extract eini_1
>edit params pump_so //配置
pump进程
extract pump_so
dynamicresolution
rmthost 192.168.0.4,mgrport 7809,compress
rmttrail /oracle/goldengate/dirdat/ma
table scott.* //如果需要对多个用户下的表进行通步的话,建议多建立几个抽取进程,以免其中一个进程出现意外停止而导致所有抽取进程都停止,减少数据的丢失。
> add extract pump_so,exttrailsource /oracle/goldengate/dirdat/la
> add rmttrail /oracle/goldengate/dirdat/ma,extract pump_so
>开启各进程
2. 配置目标端GoldenGate
目标端只需要配置两个进程即可:管理进程和复制进程
./ggsci
>dblogin userid ogg,password ufsoft
>edit params mgr
PORT 7809
PURGEOLDEXTRACTS /dirdat,USECHECKPOINTS
>start mgr
>edit params GLOBALS //全局配置,非必须
GGSCHEMA ogg
>add checkpointtable ogg.checkpoint
>add replicat rini_1,exttrail /oracle/goldengate/dirdat/ma,begin now,checkpointtable ogg.checkpoint
>edit params rini_1
REPLICAT RINI_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ASSUMETARGETDEFS
USERID ogg PASSWORD ufsoft
DISCARDFILE /oracle/goldengate/dirrpt/RINIaa.dsc,PURGE
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5
DDLERROR DEFAULT DISCARD
DDLERROR DEFAULT IGNORE RETRYOP
MAP scott.* , TARGET scott.*;
>start replicat rini_1
本文转自 baiying 51CTO博客,原文链接:http://blog.51cto.com/baiying/646454,如需转载请自行联系原作者