GoldenGate Oralce到MSSQL
只列出基本基本配置。GG 的基本安裝在此略過
首先必須生成oracle(源端)的表定義檔案
先寫好一個defgen檔案,然後呼叫GG安裝目錄下的defgen生成
生成的定義檔案如下:
*+- Defgen version 2.0, Encoding GBK
*
* Definitions created/modified 2013-07-17 09:37
*
* Field descriptions for each column entry:
*
* 1 Name
* 2 Data Type
* 3 External Length
* 4 Fetch Offset
* 5 Scale
* 6 Level
* 7 Null
* 8 Bump if Odd
* 9 Internal Length
* 10 Binary Length
* 11 Table Length
* 12 Most Significant DT
* 13 Least Significant DT
* 14 High Precision
* 15 Low Precision
* 16 Elementary Item
* 17 Occurs
* 18 Key Column
* 19 Sub Data Type
*
Database type: ORACLE
Character set ID: UTF-8
National character set ID: UTF-16
Locale: neutral
Case sensitivity: 14 14 14 14 14 14 14 14 14 14 14 14 11 14 14 14
*
Definition for table SCOTT.CUSTOMER
Record length: 996
Syskey: 0
Columns: 5
ID 64 50 0 0 0 1 0 50 50 50 0 0 0 0 1 0 1 2
FIRST_NAME 64 200 56 0 0 1 0 200 200 0 0 0 0 0 1 0 0 0
LAST_NAME 64 200 262 0 0 1 0 200 200 0 0 0 0 0 1 0 0 0
LOC 64 500 468 0 0 1 0 500 500 0 0 0 0 0 1 0 0 0
CRT_DT 192 19 974 0 0 1 0 19 19 19 0 5 0 0 1 0 0 0
End of definition
資料初始化複製程式:
源端:
GGSCI (chenyj-WorkPC) 1> view param iniext
sourceistable
userid ggs, password ggs
rmthost 127.0.0.1,mgrport 7700
rmtfile D:\ggora-ms\ggsms\dirdat\ex
table scott.customer;
呼叫 extract paramfile dirprm/iniext.prm reportfile dirpt/iniext.rpt
這樣資料就傳輸到了SQLServer的GoldenGate
目標端:
GGSCI (chenyj-WorkPC) 1> view param inirep
specialrun
end runtime
targetdb ggs_nc
extfile D:\ggora-ms\ggsms\dirdat\ex
sourcedefs D:\ggora-ms\ggsms\dirdef\source.def
map scott.customer, target dbo.customer;
呼叫replicat paramfile dirprm/inirep.prm將源端的初始資料複製進SQLServer
接下來配置即時複製程式
源端:
add extract extora1, tranlog, begin now
ADD RMTTRAIL D:\ggora-ms\ggsms\dirdat\oa, EXTRACT EXTORA1
GGSCI (chenyj-WorkPC) 1> view param extora1
extract extora1
userid ggs, password ggs
rmthost 127.0.0.1, mgrport 7700
rmttrail D:\ggora-ms\ggsms\dirdat\oa
table scott.customer;
目標端:
dblogin sourcedb ggs_nc
GGSCI (chenyj-WorkPC) 4> add checkpointtable dbo.chkpt
Successfully created checkpoint table dbo.chkpt.
GGSCI (chenyj-WorkPC) 5> add replicat msrep1,exttrail D:\ggora-ms\ggsms\dirdat\oa, checkpointtable dbo.chkpt
REPLICAT added.
GGSCI (chenyj-WorkPC) 7> view param msrep1
REPLICAT MSREP1
targetdb ggs_nc
SOURCEDEFS dirdef/source.def
MAP scott.customer, TARGET dbo.customer;
分別啟動源端的extract組oraext1與目標端的replicat組msrep1
測試。
基本複製就完成了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-766456/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GoldenGate GETTRUNCATES MSSQLGoSQL
- GoldenGate Oracle MSSQL DateGoOracleSQL
- GoldenGate MSSQL Oracle基本流程GoSQLOracle
- 【MSSQL】MSSQL 從Express版本升級到Enterprise版本SQLExpress
- GoldenGate MSSQL Oracle的主鍵問題導致的錯誤GoSQLOracle
- Oralce SQL hintSQL
- 使用GoldenGate 遷移Oracle到PostgreSQL/LightDBGoOracleSQL
- Oralce RU 安裝
- oralce函式大全函式
- oralce datatype-long
- oralce轉義字元字元
- Oracle GoldenGate 異構平臺同步(Mysql到Oracle)OracleGoMySql
- 要學習ORALCE了
- Oralce OMF 功能詳解
- [MSSQL]mssql海量高效分頁儲存過程SQL儲存過程
- MSSQL---extentsSQL
- mssql程式塊SQL
- Oralce建立模擬資料
- Oralce中分析表及索引索引
- 常用MSSQL語句SQL
- MSSQL Rebuild(重建)索引SQLRebuild索引
- Oralce 分頁 三種實現
- oralce 匯出csv格式檔案
- 設定oralce時間戳格式時間戳
- 【GoldenGate】Oracle GoldenGate(三) DDL同步配置GoOracle
- onethink如何支援MSSQL?SQL
- mssql sqlserver 索引專題SQLServer索引
- select the lock block in MSSQLBloCSQL
- mssql論壇集錦SQL
- MSSQL Server Login and DBUserSQLServer
- 清除MSSQL history 記錄SQL
- 【GoldenGate】Oracle GoldenGate(二) 雙向同步配置GoOracle
- ORALCE的執行計劃穩定性
- oralce觸發器解決問題觸發器
- oralce 10g中的segment type
- GoldenGate命令Go
- GoldenGate搭建Go
- 在jboss下,有多個mssql資料庫,如何修改mssql-service.xmlSQL資料庫XML