搜索
您的当前位置:首页GoldenGate双向复制配置

GoldenGate双向复制配置

时间:2020-11-09 来源:乌哈旅游

先进入goldengate软件安装目录,以SYSDBA身份登录oracle执行以下脚本,执行脚本过程中,需要输入的用户全部是ogg,安装模式为INI

一、双向复制节点2配置:
1)添加附加的redolog信息
DBLOGIN USERID ogg, PASSWORD ogg

ADD TRANDATA scott.*

2)配置extract
GGSCI (cuug97) 11> EDIT PARAMS EORA_1

EXTRACT EORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg, PASSWORD ogg
TRANLOGOPTIONS EXCLUDEUSER ogg (双向复制的配置关键)
EXTTRAIL ./dirdat/aa
TABLE scott.*;


GGSCI (cuug97) 11> ADD EXTRACT EORA_1, TRANLOG, BEGIN NOW
EXTRACT added.

GGSCI (cuug97) 12> ADD EXTTRAIL ./dirdat/aa, EXTRACT EORA_1, MEGABYTES 5
EXTTRAIL added.

GGSCI (cuug97) 13> START EXTRACT EORA_1

3)配置pump进程
GGSCI (cuug97) 15> EDIT PARAMS PORA_1

EXTRACT PORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
PASSTHRU
RMTHOST cuug95, MGRPORT 7809
RMTTRAIL ./dirdat/pa
TABLE scott.*;


GGSCI (cuug97) 16> ADD EXTRACT PORA_1, EXTTRAILSOURCE ./dirdat/aa
EXTRACT added.

GGSCI (cuug97) 17> ADD RMTTRAIL ./dirdat/pa, EXTRACT PORA_1, MEGABYTES 5
RMTTRAIL added.


GGSCI (cuug97) 18> START EXTRACT PORA_1


4、第一节点(原来的源数据库)
1、配置checkpoint

GGSCI (cuug95) 1> EDIT PARAMS ./GLOBALS
CHECKPOINTTABLE ogg.ggschkpt

GGSCI (cuug95) 1> exit

GGSCI (cuug95) 1> DBLOGIN USERID ogg, PASSWORD ogg
Successfully logged into database.

GGSCI (cuug95) 2> ADD CHECKPOINTTABLE

2、配置replicate
GGSCI (cuug95) 4> EDIT PARAM RORA_1

REPLICAT RORA_1
SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
USERID ogg, PASSWORD Ogg
HANDLECOLLISIONS
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/RORA_aa.DSC, PURGE
MAP scott.*, TARGET scott.*;

GGSCI (cuug95) 4> ADD REPLICAT RORA_1, EXTTRAIL ./dirdat/pa

GGSCI (cuug95) 6> START REPLICAT RORA_1

linux

Top