这篇文章将为大家详细讲解有关ogg中extract如何拆分,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。ogg的extract的拆分方法
0.背景
OGG 在部署以后,随着业务压力的增大,可能需要增加多个group来处理数据同步,在这种情况下,就需要对原有的OGG 进程拆分,同时也不能导致数据同步出现问题。
1. 停止extract进程
GGSCI (ogg1) 2&get; stop ext1
2. 停止datapump进程
这里要等到投递进程投递完成才能停止,如果在没有投递完成的情况下停止会丢数据
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
多次执行命令查看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. 修改原有相应的参数文件,将拆分出的表从参数文件中删除
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@o免费主机域名gg1, 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参数:
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 参数:
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. 确认所有参数文件正确,启动进程即可
GGSCI (ogg1) 37&get; start *
关于“ogg中extract如何拆分”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
相关推荐: Oracle11g在windows 2008 R2安装时提示ORA-00336错误怎么办
这篇文章主要介绍Oracle11g在windows 2008 R2安装时提示ORA-00336错误怎么办,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!在windows 2008 R2中安装Oracle11g,在最后一步安装提示报错,报错…