goldengate 應用進程自進行拆分時最好按照業務進行拆分,否則有可能造成應用讀取數據是業務錯亂,現將多個應用進程合併爲一個應用進程,以下爲步驟,僅供參考:
合併replicate應用進程:
1.原進程:
GGSCI (data) 142> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:03
REPLICAT RUNNING REP2 00:00:00 00:00:02
REPLICAT RUNNING REP3 00:00:00 00:00:02
REPLICAT RUNNING REP4 00:00:00 00:00:01
2.現需要將REP進程合併爲一個進程,添加一個新的應用進程:
add replicat rep,exttrail ./dirdat/aa, checkpointtable goldengate.checkpoint
把需要合併的表全部添加到新的進程中:
edit params rep
3.停止pump進程:
stop p_data
4.觀察應用進程的seqno和rba使之到達一致:
GGSCI (data) 156> info rep1
REPLICAT R_WMSJQ Last Started 2018-11-21 11:18 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 45169
Log Read Checkpoint File ./dirdat/bb000012890
2018-11-21 11:32:30.999468 RBA 340450388
5.停掉應用進程:
stop rep1
stop rep2
stop rep3
stop rep4
6.修改新的應用進程的seqno和rba:
alter rep, extseqno 12890, extrba 340450388
start rep
7.刪掉之前的分進程:
dblogin userid goldengate,password goldengate
stop rep1
delete replicat rep1