您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關(guān)ogg中extract如何拆分,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
ogg的extract的拆分方法
0.背景
OGG 在部署以后,隨著業(yè)務壓力的增大,可能需要增加多個group來處理數(shù)據(jù)同步,在這種情況下,就需要對原有的OGG 進程拆分,同時也不能導致數(shù)據(jù)同步出現(xiàn)問題。
1. 停止extract進程
GGSCI (ogg1) 2&get; stop ext1
2. 停止datapump進程
這里要等到投遞進程投遞完成才能停止,如果在沒有投遞完成的情況下停止會丟數(shù)據(jù)
GGSCI (ogg1) 4&get; info dpump
EXTRACT DPUMP Last Started 2014-03-27 20:00 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:02 ago)
Process ID 20746
Log Read Checkpoint File /u01/ggs/dirdat/lt000009
2014-03-27 20:01:36.000000 RBA 19719
多次執(zhí)行命令查看rba是否一致,如果一致說明投遞完成,那么就可以停止
GGSCI (ogg1) 7&get; stop dpump
3. 記錄extract檢查點
Extract檢查點包括:Recovery Checkpoint: Sequence 和RBA
Current Checkpoint : Sequence 和RBA
Current Checkpoint Detail:
Read Checkpoint #1
Oracle Redo Log
Startup Checkpoint (starting position in the data source):
Thread #: 1
Sequence #: 53
RBA: 25012752
Timestamp: 2014-03-27 19:59:43.000000
SCN: 0.2085381 (2085381)
Redo File: /u01/app/oracle/oradata/dave/redo02.log
Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 1
Sequence #: 53
RBA: 28138512
Timestamp: 2014-03-27 20:10:52.000000
SCN: 0.2086075 (2086075)
Redo File: /u01/app/oracle/oradata/dave/redo02.log
Current Checkpoint (position of last record read in the data source):
Thread #: 1
Sequence #: 53
RBA: 28141568
Timestamp: 2014-03-27 20:10:55.000000
SCN: 0.2086077 (2086077)
Redo File: /u01/app/oracle/oradata/dave/redo02.log
4. 修改原有相應的參數(shù)文件,將拆分出的表從參數(shù)文件中刪除
ext1進程
之前的
GGSCI (ogg1) 12&get; view param ext1
extract ext1
userid ggs@ogg1, password ggs
exttrail /u01/ggs/dirdat/lt
ddl include mapped objname sender.*;
table sender.*;
修改的
GGSCI (ogg1) 18&get; view param ext1
extract ext1
userid ggs@ogg1, password ggs
exttrail /u01/ggs/dirdat/lt
ddl include mapped objname sender.*;
table sender.dave1;
dpump進程
之前的
GGSCI (ogg1) 13&get; view param dpump
extract dpump
userid ggs@ogg1, password ggs
rmthost 192.168.2.62, mgrport 7809
rmttrail /u01/ggs/dirdat/rt
passthru
table sender.*;
dynamicresolution
修改的
GGSCI (ogg1) 19&get; view param dpump
extract dpump
userid ggs@ogg1, password ggs
rmthost 192.168.2.62, mgrport 7809
rmttrail /u01/ggs/dirdat/rt
passthru
table sender.dave1;
dynamicresolution
5. 增加新的extract,datapump
5.1添加Extract 進程
GGSCI (ogg1) 22&get; add extract ext3,tranlog, begin now
EXTRACT added.
GGSCI (ogg1) 23&get; add exttrail /u01/ggs/dirdat/E3, extract ext3
EXTTRAIL added.
5.2修改抽取進程ext3參數(shù):
GGSCI (ogg1) 26&get; view param ext3
extract ext3
userid ggs@ogg1, password ggs
exttrail /u01/ggs/dirdat/E3
ddl include mapped objname sender.*;
table sender.dave2;
5.3添加Pump 進程
GGSCI (ogg1) 28&get; add extract pump3,exttrailsource /u01/ggs/dirdat/E3
EXTRACT added.
GGSCI (ogg1) 29&get; add rmttrail /u01/ggs/dirdat/E3, extract pump3,megabytes 10
RMTTRAIL added.
5.4配置Data Pump 參數(shù):
GGSCI (gg1) 56&get; view params dpump
extract pump3
userid ggs@ogg1, password ggs
rmthost 192.168.2.62, mgrport 7809
rmttrail /u01/ggs/dirdat/E3
passthru
table sender.dave2;
dynamicresolution
6. 修改新增extract進程的檢查點
檢查點為上面記錄的兩個檢查點:current read checkpoint 和 recovery checkpoint
6.1 修改current read checkpoint
GGSCI (ogg1) 34&get; alter ext3 extseqno 53, extrba 28141568[, thread n]
這里是重點
EXTRACT altered.
6.2 修改recovery checkpoint
GGSCI (ogg1) 35&get; alter ext3 ioextseqno 53, ioextrba 28138512 [, thread n]
7. 確認所有參數(shù)文件正確,啟動進程即可
GGSCI (ogg1) 37&get; start *
關(guān)于“ogg中extract如何拆分”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。