OGG一对多的进程配置
Posted JAIR_FOREVER
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OGG一对多的进程配置相关的知识,希望对你有一定的参考价值。
1、在源端创建E进程
add extract e_59, tranlog, begin now
add exttrail ./dirdat/wj, extract e_59, megabytes 500
extract e_59
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
Userid ogg,PASSWORD ogg
REPORT AT 01:59
REPORTROLLOVER AT 02:00
CACHEMGR, CACHESIZE 512MB
TRANLOGOPTIONS EXCLUDEUSER OGG
EXTTRAIL ./dirdat/wj
NUMFILES 3000
EOFDELAYCSECS 30
GETTRUNCATES
TRANLOGOPTIONS DBLOGREADER
TRANLOGOPTIONS DBLOGREADERBUFSIZE 2014800
DYNAMICRESOLUTION
BR BRINTERVAL 2H , BRDIR BR
GETUPDATEBEFORES
NOCOMPRESSDELETES
WARNLONGTRANS 3H, CHECKINTERVAL 3M
OBEY /ogg/dirprm/e_59.txt
--TABLEEXCLUDE
2、在源端创建到其中一台目标机的P进程
add extract P_89, exttrailsource ./dirdat/wj
add rmttrail ./dirdat/wj, extract p_89, megabytes 500
EXTRACT p_89
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
Userid ogg,PASSWORD ogg
REPORT AT 01:59
REPORTROLLOVER AT 02:00
CACHEMGR, CACHESIZE 256MB
FLUSHCSECS 30
NUMFILES 3000
EOFDELAYCSECS 30
RMTHOST 目标机1IP,MGRPORT 8006, TCPBUFSIZE 100000, TCPFLUSHBYTES 300000
RMTTRAIL ./dirdat/wj
GETTRUNCATES
PASSTHRU
DYNAMICRESOLUTION
GETUPDATEBEFORES
NOCOMPRESSDELETES
OBEY /ogg/dirprm/p_89.txt
--TABLEEXCLUDE
3、在源端创建到另一台目标机的P进程
add extract P_93, exttrailsource ./dirdat/wj
add rmttrail ./dirdat/js, extract p_93, megabytes 500
EXTRACT p_93
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
Userid ogg,PASSWORD ogg
REPORT AT 01:59
REPORTROLLOVER AT 02:00
CACHEMGR, CACHESIZE 256MB
FLUSHCSECS 30
NUMFILES 3000
EOFDELAYCSECS 30
RMTHOST 目标机2IP,MGRPORT 8001, TCPBUFSIZE 100000, TCPFLUSHBYTES 300000
RMTTRAIL ./dirdat/js
GETTRUNCATES
PASSTHRU
DYNAMICRESOLUTION
GETUPDATEBEFORES
NOCOMPRESSDELETES
OBEY /ogg/dirprm/p_93.txt
--TABLEEXCLUDE
4、在目标机1创建R进程
dblogin userid ogg,password ogg
add checkpointtable ogg.ogg_checkpoint
add replicat R_59,exttrail ./dirdat/wj, checkpointtable ogg.ogg_checkpoint
REPLICAT R_59
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
Userid ogg,PASSWORD ogg
REPORT AT 01:59
REPORTROLLOVER AT 02:00
CACHEMGR, CACHESIZE 256MB
REPERROR DEFAULT,ABEND
DISCARDFILE ./dirrpt/r_59.dsc,APPEND,MEGABYTES 100
DISCARDROLLOVER AT 06:00
GETTRUNCATES
NUMFILES 3000
EOFDELAYCSECS 30
ASSUMETARGETDEFS
ALLOWNOOPUPDATES
DYNAMICRESOLUTION
GETUPDATEBEFORES
NOCOMPRESSDELETES
--HANDLECOLLISIONS
--MAPEXCLUDE JCISAPP.APPAFFAIR_DEAL
OBEY /ogg/dirprm/r_59.txt
5、在目标机2创建R进程
dblogin userid ogg,password ogg
add checkpointtable ogg.ogg_checkpoint
add replicat V_R_59,exttrail ./dirdat/js, checkpointtable ogg.ogg_checkpoint
REPLICAT V_R_59
SETENV (ORACLE_SID="orcl")
SETENV (NLS_LANG="AMERICAN_AMERICA.ZHS16GBK")
Userid ogg,PASSWORD ogg
REPORT AT 01:59
REPORTROLLOVER AT 02:00
CACHEMGR, CACHESIZE 256MB
REPERROR DEFAULT,ABEND
DISCARDFILE ./dirrpt/r_59.dsc,APPEND,MEGABYTES 100
DISCARDROLLOVER AT 06:00
GETTRUNCATES
NUMFILES 3000
EOFDELAYCSECS 30
ASSUMETARGETDEFS
ALLOWNOOPUPDATES
DYNAMICRESOLUTION
GETUPDATEBEFORES
NOCOMPRESSDELETES
--HANDLECOLLISIONS
--MAPEXCLUDE JCISAPP.APPAFFAIR_DEAL
OBEY /ogg/dirprm/v_r_59.txt
6、经过以上五步就完成了一个源端到两个目标机的复制同步配置
以上是关于OGG一对多的进程配置的主要内容,如果未能解决你的问题,请参考以下文章