GoldenGate實現oracle和sqlserver雙向資料同步
本文記錄了配置oracle和sqlserver資料同步的關鍵步驟,只為備忘!
測試環境:
oracle10.2.0.1
sqlserver2005(SQLServer2005SP3-KB955706-x86-CHS.exe)
oracle10.2.0.1
sqlserver2005(SQLServer2005SP3-KB955706-x86-CHS.exe)
oracle->sqlserver同步:
oracle和sqlserver中分別建一張測試表(表必須有主鍵)
oracle:create table n (id number(10) primary key)
sqlserver:create table n (id int primary key)
oracle:create table n (id number(10) primary key)
sqlserver:create table n (id int primary key)
oracle:
ggsci>edit param mgr
port 7809
ggsci>edit param mgr
port 7809
ggsci>dblogin userid ggs,password ggs
ggsci>add trandata test.n
ggsci>edit param eiexaa
extract eiexaa
userid ggs,password ggs
exttrail ./dirdat/dd
table test.n;
ggsci>add trandata test.n
ggsci>edit param eiexaa
extract eiexaa
userid ggs,password ggs
exttrail ./dirdat/dd
table test.n;
ggsci>edit param epmpaa
extract epmpaa
passthru
rmthost 192.168.126.131,mgrport 7809
rmttrail ./dirdat/dd
table test.n;
extract epmpaa
passthru
rmthost 192.168.126.131,mgrport 7809
rmttrail ./dirdat/dd
table test.n;
ggsci>add extract eiexaa,tranlog,begin now
ggsci>add exttrail ./dirdat/dd,extract eiexaa,megabytes 5
ggsci>add extract epmpaa,exttrailsource ./dirdat/dd
ggsci>add rmttrail ./dirdat/dd,extract epmpaa,megabytes 5
ggsci>add exttrail ./dirdat/dd,extract eiexaa,megabytes 5
ggsci>add extract epmpaa,exttrailsource ./dirdat/dd
ggsci>add rmttrail ./dirdat/dd,extract epmpaa,megabytes 5
sqlserver:
ggsci>edit param mgr
port 7809
ggsci>edit param mgr
port 7809
ggsci>sourcedb ggsdb dblogin userid ggs,password ggs
(ggsdb為系統DSN名)
ggsci>edit param rorabb
replicat rorabb
sourcedb ggsdb userid ggs,password ggs
handlecollisions
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/rorabb.dsc,PURGE
map test.n, target n;
(ggsdb為系統DSN名)
ggsci>edit param rorabb
replicat rorabb
sourcedb ggsdb userid ggs,password ggs
handlecollisions
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/rorabb.dsc,PURGE
map test.n, target n;
ggsdb資料庫建立ggs_checkpoint表
ggsci>add replicat rorabb,checkpointtable ggs_checkpoint,exttrail ./dirdat/dd
ggsci>add replicat rorabb,checkpointtable ggs_checkpoint,exttrail ./dirdat/dd
sqlserver->oracle同步:
oracle和sqlserver中分別建一張測試表(表必須有主鍵)
oracle:create table m (id number(10) primary key)
sqlserver:create table m (id int primary key)
oracle:create table m (id number(10) primary key)
sqlserver:create table m (id int primary key)
sqlserver:
ggsci>sourcedb ggsdb dblogin userid ggs,password ggs
ggsci>add trandata m
ggsci>edit param eiexbb
extract eiexbb
sourcedb ggsdb userid ggs,password ggs
exttrail ./dirdat/bb
TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
table m;
ggsci>sourcedb ggsdb dblogin userid ggs,password ggs
ggsci>add trandata m
ggsci>edit param eiexbb
extract eiexbb
sourcedb ggsdb userid ggs,password ggs
exttrail ./dirdat/bb
TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
table m;
ggsci>edit param epmpbb
extract epmpbb
passthru
rmthost 192.168.126.1,mgrport 7809
rmttrail ./dirdat/bb
table m;
extract epmpbb
passthru
rmthost 192.168.126.1,mgrport 7809
rmttrail ./dirdat/bb
table m;
ggsci>add extract eiexbb,tranlog,begin now
ggsci>add exttrail ./dirdat/bb,extract eiexbb,megabytes 5
ggsci>add extract epmpbb,exttrailsource ./dirdat/bb
ggsci>add rmttrail ./dirdat/bb,extract epmpbb,megabytes 5
ggsci>add exttrail ./dirdat/bb,extract eiexbb,megabytes 5
ggsci>add extract epmpbb,exttrailsource ./dirdat/bb
ggsci>add rmttrail ./dirdat/bb,extract epmpbb,megabytes 5
oracle:
ggsci>dblogin userid ggs,password ggs
ggsci>edit param roradd
replicat roradd
userid ggs,password ggs
handlecollisions
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/roradd.dsc,PURGE
MAP dbo.m, TARGET test.m;
ggsci>dblogin userid ggs,password ggs
ggsci>edit param roradd
replicat roradd
userid ggs,password ggs
handlecollisions
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/roradd.dsc,PURGE
MAP dbo.m, TARGET test.m;
ggs使用者下建立ggs_checkpoint表
ggsci>add replicat roradd,checkpointtable ggs.ggs_checkpoint,exttrail ./dirdat/bb
ggsci>add replicat roradd,checkpointtable ggs.ggs_checkpoint,exttrail ./dirdat/bb
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1346855/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 利用python實現mysql資料庫向sqlserver的同步PythonMySql資料庫Server
- oracle 資料透過goldengate 實時同步到kafka訊息佇列中OracleGoKafka佇列
- 雙向資料繫結實現原理
- javascript實現雙向資料繫結JavaScript
- ogg在異構資料庫實時雙向同步中如何防止資料死迴圈同步資料庫
- js 實現vue的雙向資料繫結JSVue
- vue資料雙向繫結的實現原理Vue
- Oracle和sqlserver資料型別對應OracleSQLServer資料型別
- [資料整合/資料同步] 基於資料庫增量日誌的資料同步方案 : Flink CDC/Debezium/DataX/Canal/Oracle Goldengate/Kettle/Sqoop資料庫OracleGoOOP
- 基於vue實現的雙向資料繫結Vue
- 資料結構(雙向連結串列的實現)資料結構
- 在winform中如何實現雙向資料繫結?ORM
- 資料結構-雙向連結串列(Python實現)資料結構Python
- JavaScript實現簡單的雙向資料繫結JavaScript
- 手動簡單實現Vue雙向資料繫結Vue
- 通過原生js實現資料的雙向繫結JS
- sqlserver讀取oracle資料庫資料SQLServerOracle資料庫
- Oracle Goldengate是如何保證資料有序和確保資料不丟失的?OracleGo
- 手動實現vue元件間的雙向資料繫結Vue元件
- mysql和redis實時同步資料怎麼實現MySqlRedis
- gRPC雙向資料流的互動控制(go語言實現)| gRPC雙向資料流的互動控制系列(1)RPCGo
- Oracle GoldenGate同步服務歸檔空間維護OracleGo
- MySQL 到Oracle 實時資料同步HYXSMySqlOracle
- 原生 Redis 跨資料中心雙向同步最佳化實踐Redis
- 深入理解 Object.defineProperty 及實現資料雙向繫結Object
- Vue雙向繫結實現Vue
- 實現雙向連結串列
- 資料庫同步利器 otter 雙A同步配置資料庫
- 如何在原生微信小程式中實現資料雙向繫結微信小程式
- Vue 資料雙向繫結實現二級下拉懸浮選單Vue
- 深入理解Proxy 及 使用Proxy實現vue資料雙向繫結Vue
- mysql到sqlserver資料庫實時同步工具syncnavigator註冊使用MySqlServer資料庫
- 實現服務端和客戶端的實時雙向資料傳輸-WebSocket簡單瞭解服務端客戶端Web
- ORACLE GoldenGate Initial LoadOracleGo
- About the Oracle GoldenGate TrailOracleGoAI
- SAP ERP和C4C Acount和Contact的雙向同步
- vue實現prop雙向繫結Vue
- Go實現雙向連結串列Go
- java實現雙向連結串列Java