goldengate-参数配置

goldengate 搭建参数配置:

 

 

部署完毕oracle goldengate 软件。Ggsci 命令进入shell模式

 

灾备端同样配置MGR管理进程

 

生产端

1.编辑mgr管理进程参数文件。

Edit params mgr

Port 7809

Dynamicportlist 7810-7820

Autostart extract *

Autorestart extract  *,retries 5,waitminutes 5

Purgeoldextracts ./dirdat/*,usecheckpoints,minkeepdays 3

Lagreporthours 1

Laginfominutes 30

Lagcriticalminutes 45

 

 

 

 

TRANLOGOPTIONS DBLOGREADER

配置这个参数oracle  goldengate 会自己到oracle. Asm 上面的redo log 和 归档日志。

注意这个参数不支持11gr1版本 支持11gR2版本。

 

 

 

生产端配置extract进程参数

Edit params extya

 

Extract extya

Userid goldengate,password oracle

--Setenv (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")

--setenv (ORACLE_SID=db1)

Gettruncates

Reportcount every 1 minutes,rate

Numfiles 500

Discardfile ./dirrpt/extya.dsc,append,megabytes 50

Warnlongtrans 2h,checkinterval 5m

Exttrail ./dirdat/ya

Dboptions allowunusedcolumn

--Tranlogoptions convertucs2clobs

Dynamicresolution

Table scott.*;

--Sequence scott.*;

 

配置完毕extract进程参数。

 

生产端添加extract进程组

Add extract extya,tranlog,begin now threads 2 

 

把./dirdat/ya   这个 trail 这个文件分配给 extya进程使用。

 

Add exttrail ./dirdat/nb ,extract extya, megabytes 1024

 

抽取ext:

Add extract extemp tranlog begin now threads n

注:如果单实例 threads n不写

集成抽取ext:

REGISTER EXTRACT extya DATABASE

Add extract extya integrated tranlog begin now

Add exttrail ./dirdat/nb extract extya megabytes 1024 

 

 

权限:

exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('OGG’);

 

 

 

灾备端:

1.编辑mgr管理进程参数文件。

Edit params mgr

Port 7809

Dynamicportlist 7810-7820

Autostart extract  *

Autorestart extract *,retries 5,waitminutes 5

Purgeoldextracts ./dirdat/*,usecheckpoints,minkeepdays 3

Lagreporthours 1

Laginfominutes 30

Lagcriticalminutes 45

 

灾备端添加replicat进程   编辑replication进程参数文件。

Edit params repya

 

Replicat repya

Userid goldengate,password goldengate

--Setenv (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")

--setenv (ORACLE_SID=oggt1)

Reportcount enery 30 minutes,rate

Reperror default,abend

Numfiles 1000

--Dboptions allowunusedcolumn

Maxtransops 50000

Grouptransops 10000

Checkpointsecs 40

--handlecollisions   

--Assumetargetdefs

Discardfile ./dirrpt/repya.dsc,append,megabytes 1000

Gettruncates

Allownoopupdates

Map scott.*,target scott.*;

 

 

灾备端添加checkpoint表

 

Edit params ./GLOBALS

 

Checkpointtable goldengate.ckpt 

 

 

这就是全局参数文件。

 

Dblogin userid goldengate,password oracle

 

Add checkpointtable ogg.ckpt   

添加检查表。

 

 

添加replication进程

 

Add replicat repya,exttrail ./dirdat/ya checkpointtable ogg.ckpt

 

Add replicat replis , exttrail ./dirdat/nb Checkpointtable LISDB.c##OGG.ckpt

 

 

Add replicat repsde,exttrail ./dirdat/sd Checkpointtable goldengate.ckpt

 

生产端配置data pump参数文件

 

Edit params dpeya

 

Extract dpeya

Rmthost10.10.200.231,mgrport 7809,compress

Passthru

Numfiles 500 

Rmttrail ./dirdat/nb

Dynamicresolution

 

Table scott.*;

Sequence scott.*;

编辑完毕 data pump 文件。

 

生产端添加 data pump 进程组, 并把本地的trail文件分配给data pump使用。

 

Add extract dpeya,exttrailsource ./dirdat/nb

 

 

添加远端trail文件。

 

Add  rmttrail ./dirdat/nb,extract dpeya,megabytes  1024

 

Add  rmttrail ./dirdat/sd,extract dpesde,megabytes 500

到此为止生产端的配置基本上已经完毕。

Start  起进程即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值