這篇文章將為大家詳細(xì)講解有關(guān)ogg中extract如何拆分,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
創(chuàng)新互聯(lián)公司是專業(yè)的饒陽(yáng)網(wǎng)站建設(shè)公司,饒陽(yáng)接單;提供網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站建設(shè),網(wǎng)頁(yè)設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行饒陽(yáng)網(wǎng)站開發(fā)網(wǎng)頁(yè)制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來(lái)合作!
ogg的extract的拆分方法
0.背景
OGG 在部署以后,隨著業(yè)務(wù)壓力的增大,可能需要增加多個(gè)group來(lái)處理數(shù)據(jù)同步,在這種情況下,就需要對(duì)原有的OGG 進(jìn)程拆分,同時(shí)也不能導(dǎo)致數(shù)據(jù)同步出現(xiàn)問(wèn)題。
1. 停止extract進(jìn)程
GGSCI (ogg1) 2&get; stop ext1
2. 停止datapump進(jìn)程
這里要等到投遞進(jìn)程投遞完成才能停止,如果在沒(méi)有投遞完成的情況下停止會(huì)丟數(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是否一致,如果一致說(shuō)明投遞完成,那么就可以停止
GGSCI (ogg1) 7&get; stop dpump
3. 記錄extract檢查點(diǎn)
Extract檢查點(diǎn)包括: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. 修改原有相應(yīng)的參數(shù)文件,將拆分出的表從參數(shù)文件中刪除
ext1進(jìn)程
之前的
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進(jìn)程
之前的
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 進(jìn)程
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修改抽取進(jìn)程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 進(jìn)程
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進(jìn)程的檢查點(diǎn)
檢查點(diǎn)為上面記錄的兩個(gè)檢查點(diǎn):current read checkpoint 和 recovery checkpoint
6.1 修改current read checkpoint
GGSCI (ogg1) 34&get; alter ext3 extseqno 53, extrba 28141568[, thread n]
這里是重點(diǎn)
EXTRACT altered.
6.2 修改recovery checkpoint
GGSCI (ogg1) 35&get; alter ext3 ioextseqno 53, ioextrba 28138512 [, thread n]
7. 確認(rèn)所有參數(shù)文件正確,啟動(dòng)進(jìn)程即可
GGSCI (ogg1) 37&get; start *
關(guān)于“ogg中extract如何拆分”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。