oracle goldengate 初始化實驗步驟
在配置GoldenGate環境時,剛開始的時候,我們總是需要先初始化把Source Database中需要複製的表的資料先load到目標庫中,除非Source Database是一個新建的庫或需要複製的物件中還沒有任何資料。
目標:為了實現node1中的gate01.到node2的實時資料同步,在配置OGG實現同步前,先把兩個系統中的表中的資料完成初始化同步。
說明:完成這個資料同步的技術很多,我這裡僅僅是為了說明如何利用GoldenGate的Direct Load的方法實現資料的同步。
把源端資料庫的資料同步到目標資料庫
初始環境:利用系統的測試指令碼(demo_ora_create.sql、demo_ora_insert.sql)完成源端建表和資料插入,目標端的建表工作。
源端資料庫:
1、為gate01建立專用的表空間
SQL> create tablespace ggs
2 datafile '/home/app/oradata/node1/ggs01.dbf' size 50m,'/home/app/oradata/node1/ggs02.dbf' size 50m;
Tablespace created.
2、在源資料庫上建資料庫使用者gate01
SQL> create user gate01 identified by gate01
2 default tablespace ggs
3 temporary tablespace TEMP
4 quota unlimited on ggs;
User created.
SQL> grant connect,resource,dba to gate01;
Grant succeeded.
3、在源資料庫上建資料庫使用者gate01的表TCUSTMER、TCUSTORD,並插入記錄:
SQL> conn gate01/gate01
Connected.
SQL> @demo_ora_create.sql
SQL> @demo_ora_insert.sql
目標資料庫:
4、為gate02建立專用的表空間
SQL> create tablespace ggs
2 datafile '/home/app/oradata/node2/ggs01.dbf' size 50m,'/home/app/oradata/node2/ggs02.dbf' size 50m;
Tablespace created.
5、建資料庫使用者gate02
SQL> create user gate02 identified by gate02
2 default tablespace ggs
3 temporary tablespace TEMP
4 quota unlimited on ggs;
User created.
SQL> grant connect,resource,dba to gate02;
Grant succeeded.
6、在目標資料庫上建資料庫使用者gate02的表TCUSTMER、TCUSTORD,不需要插入記錄
SQL> conn gate02/gate02
Connected.
SQL> @demo_ora_create.sql
7、在源資料上配置管理程式MGR
GGSCI (node1) 1> edit params mgr
port 7809
GGSCI (source) 2> start mgr –啟動管理程式
Manager started.
8、在目標資料庫上配置管理程式MGR
GGSCI (node2) 1> edit params mgr
port 7809
GGSCI (node2) 2> start mgr
Manager started.
9、在源和目的端檢查管理程式是否啟動
GGSCI (node1) 3> info mgr
Manager is running (IP port node1.7809).
GGSCI (node2) 3> info mgr
Manager is running (IP port node2.7809).
10、在源資料庫上增加需要傳輸的使用者表
GGSCI (node1) 4> dblogin userid gate01,password gate01
Successfully logged into database.
GGSCI (node1) 5> add trandata gate01.tcustmer
Logging of supplemental redo data enabled for table GATE01.TCUSTMER.
GGSCI (node1) 7> add trandata gate01.tcustord
Logging of supplemental redo data enabled for table GATE01.TCUSTORD.
GGSCI (node1) 9> info trandata gate01.*
Logging of supplemental redo log data is enabled for table GATE01.TCUSTMER
Logging of supplemental redo log data is enabled for table GATE01.TCUSTORD
11、在源資料庫上配置extract程式 Eora01
GGSCI (node1) 10> add extract eora01,sourceistable
EXTRACT added.
GGSCI (node1) 11> info extract *, tasks
GGSCI (node1) 12> edit params eora01
extract eora01
userid gate01, password gate01
rmthost 192.168.150.129, mgrport 7809
rmttask replicat, group rora01
table gate01.*;
12、在目標資料庫上配置replicat程式 Rora01
GGSCI (node2) 4> ADD REPLICAT Rora01, SPECIALRUN
REPLICAT added.
GGSCI (node2) 5> INFO REPLICAT *, TASKS
GGSCI (node2) 6> EDIT PARAMS Rora01
REPLICAT Rora01
ASSUMETARGETDEFS
USERID gate02, PASSWORD "gate02"
DISCARDFILE ./dirrpt/Rora01.dsc, PURGE
MAP gate01.*, TARGET gate02.*;
13、在源資料庫上執行初始化過程
GGSCI (node1) 4>START EXTRACT Eora01
GGSCI (node1) 5>VIEW REPORT EORA01(在源資料上檢視是否有報錯)
GGSCI (node1) 6> VIEW REPORT EORA01
GGSCI (node2) 10>VIEW REPORT RORA01(在目標資料上檢視是否有報錯)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21256317/viewspace-1063570/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle goldengate 初始化OracleGo
- Oracle GoldenGate 簡單實驗OracleGo
- [原創]總結:實施goldengate director的步驟Go
- GoldenGate軟體升級步驟Go
- oracle 10g rac hacmp 遷移到asm實驗步驟Oracle 10gACMASM
- Oracle ADG實施步驟Oracle
- goldengate 刪除複製程式步驟Go
- oracle goldengate 配置DML&DDL實驗OracleGo
- oracle 10g rac modify public ip,private ip,vip實驗步驟Oracle 10g
- Oracle GoldenGate 資料同步初始化最佳實戰(Data Pump)OracleGo
- oracle golengate實施方案大概步驟OracleGo
- ORACLE 10G DATAGUARD實戰步驟Oracle 10g
- DataGuard寫測試實驗步驟及總結
- Oracle重建awr步驟Oracle
- oracle 安裝步驟Oracle
- oracle升級步驟Oracle
- ORACLE啟動步驟Oracle
- Oracle GoldenGate系統之----資料初始化OracleGo
- Oracle Goldengate重新初始化的 3種方法OracleGo
- Oracle goldengate初始化資料注意事項OracleGo
- 關於外來鍵的理解和實驗步驟
- ORACLE重建OEM的步驟Oracle
- Oracle DataGuard切換步驟Oracle
- 建立oracle快照的步驟Oracle
- oracle 10g rac em重建實施步驟Oracle 10g
- composer init 初始化專案8個步驟
- Logstash 的命令列入門 ( 附上相關實驗步驟 )命令列
- 單核心,ospf子公司通訊詳細實驗步驟單核
- GoldenGate同步初始化Go
- Oracle GoldenGate安裝初體驗OracleGo
- 1、啟動oracle的步驟Oracle
- 簡單oracle安裝步驟Oracle
- Oracle EM agent刪除步驟Oracle
- ORACLE RAC OCFS(步驟簡要)Oracle
- VMware中配置ORACLE DATAGUARD步驟Oracle
- Oracle Stream配置詳細步驟Oracle
- Oracle SQL優化基本步驟OracleSQL優化
- Oracle GoldenGate容災專案初始化調研模板OracleGo