OGG 複製程式拆分
需求:OGG 原來將很多表放到一個複製程式的引數檔案裡面了需要進行細分把一部分表 劃分出來用另外一個程式管理。
原來的複製程式引數檔案如下:
黑色框出部門為我們需要拆分出來的表:
步驟:
1、停止replicat 程式
stop replicat_name
2、檢視檢查點記錄下Sequence 和RBA 留做後用
GGSCI (og2) 23> info replgg,showch
REPLICAT REPLGG Last Started 2014-07-02 20:26 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:03:01 ago)
Log Read Checkpoint File /u01/ogg/dirdat/kt000037
2014-07-02 20:30:22.699200 RBA 1883
Current Checkpoint Detail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 35
RBA: 8430
Timestamp: 2014-07-02 20:25:05.842502
Extract Trail: /u01/ogg/dirdat/kt
Current Checkpoint (position of last record read in the data source):
Sequence #: 37
RBA: 1883 -------RBA和Sequence
Timestamp: 2014-07-02 20:30:22.699200
Extract Trail: /u01/ogg/dirdat/kt
CSN state information:
CRC: 33-3D-71-BC
Latest CSN: 2736049
Latest TXN: 1.20.1420
Latest CSN of finished TXNs: 2736049
Completed TXNs: 1.20.1420
Header:
Version = 2
Record Source = A
Type = 1
# Input Checkpoints = 1
# Output Checkpoints = 0
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 0
Transaction Integrity = -1
Task Type = 0
Database Checkpoint:
Checkpoint table = regg.chkpoint
Key = 3537550738 (0xd2dabd92)
Create Time = 2014-05-22 23:49:29
Status:
Start Time = 2014-07-02 20:26:44
Last Update Time = 2014-07-04 00:36:42
Stop Status = G
Last Result = 400
3、將原來的引數檔案中的兩張表刪除:
4、增加新的複製程式名稱為replggg
GGSCI (og2) 26> edit params replggg
引數如下:
replicat replggg
HANDLECOLLISIONS
ASSUMETARGETDEFS
GETTRUNCATES
GROUPTRANSOPS 100
REPORT AT 0:00
ALLOWNOOPUPDATES
ddlerror default ignore retryop maxretries 3 retrydelay 5
USERID regg , PASSWORD regg
DISCARDFILE ./dirrpt/RINIaa.dsc, PURGE
DECRYPTTRAIL AES192 KEYNAME mykey2
map gg.col,target regg.col;
map ggdl.tes,target ggdl.tes;
GGSCI (og2) 27> ADD REPLICAT replggg, EXTTRAIL /u01/ogg/dirdat/kt checkpointtable regg.chkpoint---------這裡的trial 檔案就是原來的trial 檔案檢測表用你原來的檢測表就行
REPLICAT added.
5、檢視新增是否成功
GGSCI (og2) 28> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT STOPPED REPLGG 00:00:00 00:07:53
REPLICAT STOPPED REPLGGG 00:00:00 00:00:03
6、修改檢查點用到剛才的Sequence 和RBA
GGSCI (og2) 29> alter replggg extseqno 37, extrba 1883
REPLICAT altered.
7、啟動程式
start replggg
原來的複製程式引數檔案如下:
黑色框出部門為我們需要拆分出來的表:
步驟:
1、停止replicat 程式
stop replicat_name
2、檢視檢查點記錄下Sequence 和RBA 留做後用
GGSCI (og2) 23> info replgg,showch
REPLICAT REPLGG Last Started 2014-07-02 20:26 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:03:01 ago)
Log Read Checkpoint File /u01/ogg/dirdat/kt000037
2014-07-02 20:30:22.699200 RBA 1883
Current Checkpoint Detail:
Read Checkpoint #1
GGS Log Trail
Startup Checkpoint (starting position in the data source):
Sequence #: 35
RBA: 8430
Timestamp: 2014-07-02 20:25:05.842502
Extract Trail: /u01/ogg/dirdat/kt
Current Checkpoint (position of last record read in the data source):
Sequence #: 37
RBA: 1883 -------RBA和Sequence
Timestamp: 2014-07-02 20:30:22.699200
Extract Trail: /u01/ogg/dirdat/kt
CSN state information:
CRC: 33-3D-71-BC
Latest CSN: 2736049
Latest TXN: 1.20.1420
Latest CSN of finished TXNs: 2736049
Completed TXNs: 1.20.1420
Header:
Version = 2
Record Source = A
Type = 1
# Input Checkpoints = 1
# Output Checkpoints = 0
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 0
Transaction Integrity = -1
Task Type = 0
Database Checkpoint:
Checkpoint table = regg.chkpoint
Key = 3537550738 (0xd2dabd92)
Create Time = 2014-05-22 23:49:29
Status:
Start Time = 2014-07-02 20:26:44
Last Update Time = 2014-07-04 00:36:42
Stop Status = G
Last Result = 400
3、將原來的引數檔案中的兩張表刪除:
4、增加新的複製程式名稱為replggg
GGSCI (og2) 26> edit params replggg
引數如下:
replicat replggg
HANDLECOLLISIONS
ASSUMETARGETDEFS
GETTRUNCATES
GROUPTRANSOPS 100
REPORT AT 0:00
ALLOWNOOPUPDATES
ddlerror default ignore retryop maxretries 3 retrydelay 5
USERID regg , PASSWORD regg
DISCARDFILE ./dirrpt/RINIaa.dsc, PURGE
DECRYPTTRAIL AES192 KEYNAME mykey2
map gg.col,target regg.col;
map ggdl.tes,target ggdl.tes;
GGSCI (og2) 27> ADD REPLICAT replggg, EXTTRAIL /u01/ogg/dirdat/kt checkpointtable regg.chkpoint---------這裡的trial 檔案就是原來的trial 檔案檢測表用你原來的檢測表就行
REPLICAT added.
5、檢視新增是否成功
GGSCI (og2) 28> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT STOPPED REPLGG 00:00:00 00:07:53
REPLICAT STOPPED REPLGGG 00:00:00 00:00:03
6、修改檢查點用到剛才的Sequence 和RBA
GGSCI (og2) 29> alter replggg extseqno 37, extrba 1883
REPLICAT altered.
7、啟動程式
start replggg
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26764973/viewspace-1208553/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- OGG拆分程式
- ogg 併發複製程式自阻塞
- OGG複製程式掛起abended處理
- OGG雙向DML複製操作
- OGG單向DDL複製操作
- ogg中抽取或複製程式(extract or replicat)中表的的重複配置
- OGG複製程式延遲高,優化方法一(使用索引)優化索引
- OGG 指定csn啟動複製程式的另一種方式
- OGG複製程式出現 OGG-00868, 904-ORA-00904 "VISIBILITY"
- ogg複製程式報ORA-01438錯誤處理
- Goldengate的複製程式出錯OGG-01296Go
- ogg12 oracle to oracle 雙向DDL複製Oracle
- ogg長交易查詢及增加複製表
- OGG複製與加密欄位的衝突加密
- oracle時間格式記錄異常導致OGG複製程式報錯Oracle
- OGG 12c mysql複製到oracle部署方案MySqlOracle
- OGG_mysql 12c複製到OGG_oracle 11g部署方案MySqlOracle
- OGG classic模式maxtransops引數提升複製效率模式
- 複製程式碼
- OGG同步複製時與相容觸發器解決方法觸發器
- OGG複製程式延遲高,優化方法二(存在索引),SQL選擇不好的索引優化索引SQL
- 小程式複製功能
- 【OGG】關於在一套複製環境中使用不同版本OGG的問題
- Oracle 19C OGG基礎運維-06增加複製表Oracle運維
- sqlserver2008_ogg單向複製配置文件SQLServer
- 配置OGG到MYSQL複製時登陸MYSQL報錯解決MySql
- SharePlex qview工具 vs OGG logdump工具探究兩個複製工具事務開始 or 事務提交複製?View
- 淺複製和深複製的概念與值複製和指標複製(引用複製)有關 淺複製 “指標複製 深複製 值複製指標
- 最簡單的螢幕複製程式(象素複製) (轉)
- Oracle 19C OGG基礎運維-07減少複製表Oracle運維
- 使用事件溯源、Kafka和OGG從Oracle內部複製資料事件KafkaOracle
- OGG複製同步,提示欄位長度不夠ORA-01704
- OGG 12.3中支援系統procedure複製的幾點說明
- 微信小程式複製功能微信小程式
- Java引用複製、淺複製、深複製Java
- (一)OGG的安裝與配置,並實現單向DML複製操作
- JS物件複製:深複製和淺複製JS物件
- poi操作excel,複製sheet,複製行,複製單元格,複製styleExcel