一個Golden Gate實時資料分發的例子

Jujay發表於2011-09-23
本文記錄在我工作中的一個Golden Gate實時資料分發的例子,資料從一個RKS資料庫分發到兩個兩個ESG資料庫。
Extract                Pump                Replicat
E130RKS2        P101ESG2      R130RKS2
E230RKS2        P203ESG1      R130RKS2

Source端(O30RKS2):
GGSCI (gdcps1958) 4> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     E130RKS2    00:00:00      00:00:04
EXTRACT     RUNNING     E230RKS2    00:00:00      00:00:07
EXTRACT     RUNNING     P101ESG2    00:00:00      00:00:08
EXTRACT     RUNNING     P203ESG1    00:00:00      00:00:02

Manager (mgr.prm):
--port that manager runs on
port 7809
--Forces manager to restart extract, datapump and replicat if they shut down
AUTORESTART ER *, RETRIES 12, WAITMINUTES 5, RESETMINUTES 60
--Manages trail files to conserve space
PURGEOLDEXTRACTS ./dirdat/O30RKS2/*, USECHECKPOINTS, MINKEEPFILES 10, FREQUENCYMINUTES 15
--Specifies to log the lag time as a warning in the event log
LAGCRITICALMINUTES 5
--Specifies how often to report lag info to the event log
LAGREPORTMINUTES 60
LAGINFOMINUTES 0
Extract1 (E130RKS2.prm):
EXTRACT E130RKS2
COMMENT ************  CHANGE USER NAME AND PASSWORD IN NEXT LINE
userid gguser, PASSWORD AACAAAAAAAAAAAHAJIBENEGDMADEQGTH, ENCRYPTKEY DEFAULT
SETENV TNS_ADMIN='/usr/local/oracle/network'
SETENV TWO_TASK='O30RKS2'
EXTTRAIL ./dirdat/O30RKS2/e1
--prevent loop back
TRANLOGOPTIONS EXCLUDEUSER gguser
--THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 2700 IOLATENCY 2700
INCLUDE ./dirprm/extract_include_msim_buat_core.prm
Pumb1 (P101ESG2.prm):
EXTRACT P101ESG2
PASSTHRU
REPORTCOUNT EVERY 200 RECORDS, rate
RMTHOST desg08 MGRPORT 7909 --遠端replicat的manager地址
RMTTRAIL ./dirdat/O30RKS2/e1
TABLE MSIM_BUAT_CORE.*;
Extract2 (E230RKS2.prm):
EXTRACT E230RKS2
COMMENT ************  CHANGE USER NAME AND PASSWORD IN NEXT LINE
userid gguser, PASSWORD AACAAAAAAAAAAAHAJIBENEGDMADEQGTH, ENCRYPTKEY DEFAULT
SETENV TNS_ADMIN='/usr/local/oracle/network'
SETENV TWO_TASK='O30RKS2'
EXTTRAIL ./dirdat/O30RKS2/e2
--prevent loop back
TRANLOGOPTIONS EXCLUDEUSER gguser
--THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 2700 IOLATENCY 2700
INCLUDE ./dirprm/extract_include_deam_buat_core.prm
Pumb2 (P203ESG1.prm):
EXTRACT P203ESG1
PASSTHRU
REPORTCOUNT EVERY 200 RECORDS, rate
RMTHOST desg06 MGRPORT 7809
RMTTRAIL ./dirdat/O30RKS2/e2
TABLE DEAM_BUAT_CORE.*;
Target端1(O01ESG2):
GGSCI (gdcbl3215) 1> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     R130RKS2    00:00:00      00:00:09
Manager (mgr.prm):
--port that manager runs on
port 7909
--Forces manager to restart extract, datapump and replicat if they shut down
AUTORESTART ER *, RETRIES 12, WAITMINUTES 5 , RESETMINUTES 60
--Manages trail files to conserve space
PURGEOLDEXTRACTS ./dirdat/O30RKS2/*. USECHECKPOINTS, MINKEEPFILES 10,FREQUENCYMINUTES 15
--Specifies to log the lag time as a warning in the event log
LAGCRITICALMINUTES 5
--Specifies how often to report lag into the event log
LAGREPORTMINUTES 60
LAGINFOMINUTES 0
Replicat1 (R130RKS2.prm):
replicat R130RKS2
SETENV TNS_ADMIN='/usr/local/oracle/network'
SETENV ORACLE_SID='O01ESG2B'
userid gguser, PASSWORD AACAAAAAAAAAAAGAWHIJOHDJJFSGVCIH, ENCRYPTKEY DEFAULT
include ./dirprm/auth_include.prm
SOURCEDEFS ./dirprm/rks_definitions.prm
DISCARDFILE ./dirout/RKSTST.dsc, purge
--HANDLECOLLISIONS
INCLUDE ./dirprm/replicat_include_rks.prm
Target端2(O01ESG2):
GGSCI (gdcul3247) 1> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     R130RKS2    00:00:00      00:00:07
Manager (mgr.prm):
--port that manager runs on
port 7809
--Forces manager to restart extract, datapump and replicat if they shut down
--AUTORESTART ER *, RETRIES 12, WAITMINUTES 5, RESETMINUTES 60
--Manages trail files to conserve space
PURGEOLDEXTRACTS ./dirdat/O03ESG1/*, USECHECKPOINTS, MINKEEPFILES 10, FREQUENCYMINUTES 15
PURGEOLDEXTRACTS ./dirdat/O30RKS2/*, USECHECKPOINTS, MINKEEPFILES 10, FREQUENCYMINUTES 15
--Specifies to log the lag time as a warning in the event log
LAGCRITICALMINUTES 5
--Specifies how often to report lag info to the event log
LAGREPORTMINUTES 60
LAGINFOMINUTES 0
Replicat2 (R130RKS2.prm):
replicat R130RKS2
SETENV ORACLE_SID='O03ESG1A'
userid gguser, PASSWORD AACAAAAAAAAAAAGAWHIJOHDJJFSGVCIH, ENCRYPTKEY DEFAULT
SOURCEDEFS ./dirprm/rks_definitions_deam_buat_core.prm
DISCARDFILE ./dirout/RKSTST.dsc, purge
--HANDLECOLLISIONS
INCLUDE ./dirprm/replicat_include_deam_buat_core.prm


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26277071/viewspace-708210/,如需轉載,請註明出處,否則將追究法律責任。

相關文章