GoldenGate<三> configure data-distribution(1對多複製)
此文將在前兩文基礎上介紹如何配置一個一對多的資料分散式複製體系。
方法與前面大同小異,再次僅突出重點。
由於測試機器不夠,我就在Target上的DB裡建立兩個User,分別代表兩個Target環境。
這裡需要注意的是,兩個Target可以使用同一個GG binary,也可以使用同一個MGR(同一個port),只是需要配置不同的REPLICAT而已。
1.Source 新增EXTRACT
GGSCI (xxx) 120> ADD EXTRACT HAOEXMUL, TRANLOG, BEGIN now
EXTRACT added.
GGSCI (xxx) 121> edit params HAOEXMUL
EXTRACT HAOEXMUL
SETENV (ORACLE_SID=MOT)
USERID , PASSWORD GGS
EXTTRAIL ./dirdat/za
TABLE HAOZHU_USER.GGMULTI;
~
"dirprm/haoexmul.prm" 5 lines, 118 characters written
GGSCI (xxx) 124> ADD EXTTRAIL ./dirdat/za, EXTRACT HAOEXMUL
EXTTRAIL added.
GGSCI (xxx) 125> start extract HAOEXMUL
Sending START request to MANAGER ...
EXTRACT HAOEXMUL starting
GGSCI (xxx) 126> info HAOEXMUL
EXTRACT HAOEXMUL Last Started 2010-04-22 12:23 Status RUNNING
Checkpoint Lag 00:13:57 (updated 00:00:03 ago)
Log Read Checkpoint Oracle Redo Logs
2010-04-22 12:09:54 Seqno 64, RBA 8503312
2.Source新增兩個data pump EXTRACT
GGSCI (xxx) 110> ADD EXTRACT HAODP1, EXTTRAILSOURCE ./dirdat/za, BEGIN now
EXTRACT added.
GGSCI (xxx) 111> ADD EXTRACT HAODP2, EXTTRAILSOURCE ./dirdat/za, BEGIN now
EXTRACT added.
GGSCI (xxx) 112> ADD RMTTRAIL ./dirdat/za, EXTRACT HAODP1
RMTTRAIL added.
GGSCI (xxx) 113> ADD RMTTRAIL ./dirdat/zb, EXTRACT HAODP2
RMTTRAIL added.
GGSCI (xxx) 114> edit params HAODP1
EXTRACT HAODP1
SETENV (ORACLE_SID=MOT)
USERID , PASSWORD GGS
RMTHOST xxx.xxx.xxx.xxx, MGRPORT 7809
RMTTRAIL ./dirdat/za
TABLE HAOZHU_USER.GGMULTI;
~
~
"dirprm/haodp1.prm" [New File] 6 lines, 158 characters written
GGSCI (xxx) 115> edit params HAODP2
EXTRACT HAODP2
SETENV (ORACLE_SID=MOT)
USERID , PASSWORD GGS
RMTHOST xxx.xxx.xxx.xxx, MGRPORT 7809
RMTTRAIL ./dirdat/zb
TABLE HAOZHU_USER.GGMULTI;
~
"dirprm/haodp2.prm" [New File] 6 lines, 159 characters written
GGSCI (xxx) 128> start HAODP1
Sending START request to MANAGER ...
EXTRACT HAODP1 starting
GGSCI (xxx) 129> start HAODP2
Sending START request to MANAGER ...
EXTRACT HAODP2 starting
GGSCI (xxx) 130> info HAODP1
EXTRACT HAODP1 Last Started 2010-04-22 12:29 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint File ./dirdat/za000000
2010-04-22 12:04:39.000000 RBA 0
GGSCI (xxx) 131> info HAODP2
EXTRACT HAODP2 Last Started 2010-04-22 12:29 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:02 ago)
Log Read Checkpoint File ./dirdat/za000000
2010-04-22 12:04:44.000000 RBA 0
3.Target 新增兩個Replicat
GGSCI (xxx) 32> ADD REPLICAT HAOREPA, EXTTRAIL ./dirdat/za, BEGIN now , nodbcheckpoint
REPLICAT added.
GGSCI (xxx) 33> ADD REPLICAT HAOREPB, EXTTRAIL ./dirdat/zb, BEGIN now , nodbcheckpoint
REPLICAT added.
GGSCI (xxx) 34> edit params HAOREPA
REPLICAT HAOREPA
ASSUMETARGETDEFS
SETENV (ORACLE_SID=DC1)
USERID GGS, PASSWORD GGS
map HAOZHU_USER.GGMULTI , target HAOZHU_USER.GGMULTI;
~
"dirprm/haorepa.prm" [New File] 5 lines, 137 characters written
GGSCI (xxx) 35> edit params HAOREPB
REPLICAT HAOREPB
ASSUMETARGETDEFS
SETENV (ORACLE_SID=DC1)
USERID GGS, PASSWORD GGS
map HAOZHU_USER.GGMULTI , target HAOZHU2_USER.GGMULTI;
~
"dirprm/haorepb.prm" [New File] 5 lines, 138 characters written
GGSCI (xxx) 36> start HAOREPA
Sending START request to MANAGER ...
REPLICAT HAOREPA starting
GGSCI (xxx) 37> start HAOREPB
Sending START request to MANAGER ...
REPLICAT HAOREPB starting
GGSCI (xxx) 38> info HAOREPA
REPLICAT HAOREPA Last Started 2010-04-22 12:35 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Log Read Checkpoint File ./dirdat/za000000
2010-04-22 12:32:46.000000 RBA 0
GGSCI (xxx) 39> info HAOREPB
REPLICAT HAOREPB Last Started 2010-04-22 12:35 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:06 ago)
Log Read Checkpoint File ./dirdat/zb000000
2010-04-22 12:32:50.000000 RBA 0
4.測試
在Source:
SQL> insert into ggmulti select * from dba_objects;
10045 rows created.
SQL> commit;
Commit complete.
在Target:
SQL> show user
USER is "HAOZHU2_USER"
SQL> select count(*) from ggmulti;
COUNT(*)
----------
10045
SQL> show user
USER is "HAOZHU_USER"
SQL> select count(*) from ggmulti;
COUNT(*)
----------
10045
(這裡感謝Thomas Zhang的幫助讓我找到一個配置中的失誤:))
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15415488/viewspace-660466/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GoldenGate多對一複製Go
- GoldenGate配置(三)之DDL複製配置Go
- goldengate配置DDL複製Go
- GoldenGate的複製原理Go
- 資料複製_GoldenGateGo
- GoldenGate單向複製配置(支援DDL複製)Go
- goldengate針對不同表名及列名的複製Go
- goldengate 過濾對某張表的複製操作Go
- goldengate基於表複製Go
- goldengate 單向複製配置Go
- oracle goldengate 雙向複製配置OracleGo
- goldengate單向複製的配置Go
- oracle goldengate 雙活複製避免迴圈複製引數OracleGo
- Oracle 10g stream 一對多複製Oracle 10g
- GoldenGate的簡介與複製原理Go
- goldengate 刪除複製程式步驟Go
- EOFDELAYCSECS GOLDENGATE提升複製實時性Go
- GoldenGate DML複製增刪改表Go
- MySQL 8 複製(三)——延遲複製與部分複製MySql
- GoldenGate<二> configure data pumpGo
- GoldenGate簡單複製環境的搭建Go
- GoldenGate schema級複製 實施過程Go
- GoldenGate配置(二)之雙向複製配置Go
- GoldenGate配置(一)之單向複製配置Go
- 如何批量複製多個檔案到多個目錄中(批量複製檔案,多對多檔案高效操作的方法)
- MySQL 多源複製MySql
- GoldenGate複製的幾個簡單測試Go
- GoldenGate在異構環境下的複製Go
- 【轉】GoldenGate資料庫複製實施案例Go資料庫
- 對於複製普通物件 深複製和淺複製是否一樣物件
- ZeroClipboard 多個複製按鈕,多個複製連結 實現方式
- mysql 5.7多源複製MySql
- 用python生成oracle goldengate複製配置檔案PythonOracleGo
- GoldenGate異種資料庫之間的複製Go資料庫
- 搭建oracle 11.2.0.4環境下的goldengate複製OracleGo
- Oracle 11g GoldenGate單向複製配置(DML)OracleGo
- 實戰goldengate之ora-To-ora單向複製Go
- Goldengate複製程式錯誤Fatal error executing DDLGoError