ogg goldengate 队列文件不自动清除
ogg goldengate 队列文件不自动清除首先确认manager参数文件mgr.prm中是否添加了定期清除参数:
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 3
修改之后,必须重启manager即可看到队列文件占用的空间被按照上面指定的规则释放。
如果还是没有删除,通过:GGSCI>INFO XXX, SHOWCH,查看是否存在多个Write Checkpoint,一个为相对路径,一个为绝对路径
原因如下:
源端:
在增加extract和datapump时,在GGSCI命令行指定的路径和参数文件中的不一致,如果在命令行使用绝对路径,在参数文件中必须使用绝对路径。如果使用了相对路径,则统一采用相对路径。
目标端:
在GGSCI增加datapump时,RMTTRAIL如果使用了相对路径,在增加replicat时必须使用相对路径。
处理方法:
GGSCI>INFO XXX, SHOWCH
GGSCI>INFO XXX
记录相关信息,删除不正确路径的exttrail
通过alter命令设置为上面INFO信息记录的检查点
GGSCI>alter xxx extseqno INFO看到的序列号, extrba INFO看到的RBA号码,
GGSCI>start xxx
举例:
GGSCI > info exttrail dpecw
Extract Trail: /ggsfs/dirdat/cw
Extract: DPECW
Seqno: 0
RBA: 0
File Size: 50M
Extract Trail: ./dirdat/cw
Extract: DPECW
Seqno: 365
RBA: 8497768
File Size: 10M
可以看到有两个路径,一个是相对路径./dirdat/cw,一个是绝对路径:/ggsfs/dirdat/cw
GGSCI > stop dpecw
Sending STOP request to EXTRACT DPECW ...
Request processed.
GGSCI > status dpecw
EXTRACT DPECW: STOPPED
GGSCI > info dpecw
EXTRACT DPECW Last Started 2011-03-23 11:03 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Log Read Checkpoint File /ggsfs/dirdat/cw000365
2011-04-07 14:10:01.000000 RBA 4558731
记录seqno:365和rba:4558731
GGSCI > stop extcw
Sending STOP request to EXTRACT EXTCW ...
Request processed.
GGSCI > info exttrail cw*
Extract Trail: /ggsfs/dirdat/cw
Extract: DPECW
Seqno: 0
RBA: 0
File Size: 50M
Extract Trail: ./dirdat/cw
Extract: DPECW
Seqno: 365
RBA: 8497768
File Size: 10M
Extract Trail: /ggsfs/dirdat/cw
Extract: EXTCW
Seqno: 0
RBA: 0
File Size: 50M
Extract Trail: ./dirdat/cw
Extract: EXTCW
Seqno: 365
RBA: 4657905
File Size: 10M
可以看到extcw和dpecw都存在问题
删除多余的exttrail
GGSCI > delete exttrail /ggsfs/dirdat/cw
Deleting extract trail /ggsfs/dirdat/cw for extract DPECW
Deleting extract trail /ggsfs/dirdat/cw for extract EXTCW
GGSCI > info exttrail *
Extract Trail: ./dirdat/cw
Extract: DPECW
Seqno: 365
RBA: 8497768
File Size: 10M
Extract Trail: ./dirdat/cw
Extract: EXTCW
Seqno: 365
RBA: 4657905
File Size: 10M
确认已经正常
GGSCI > info extcw
EXTRACT EXTCW Last Started 2011-04-07 14:16 Status RUNNING
Checkpoint Lag 00:00:58 (updated 00:00:07 ago)
Log Read Checkpoint Oracle Redo Logs
2011-04-07 14:15:30 Seqno 10726, RBA 151756800
确认和之前info extcw时的信息一致,启动extcw
GGSCI (ora5502) 18> start extcw
Sending START request to MANAGER ...
EXTRACT EXTCW starting
GGSCI > info dpecw
EXTRACT DPECW Initialized 2011-03-23 11:03 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:02:19 ago)
Log Read Checkpoint File /ggsfs/dirdat/cw000365
2011-04-07 14:10:01.000000 RBA 4558731
GGSCI > alter dpecw, exttrailsource ./dirdat/cw
EXTRACT altered.
GGSCI > info dpecw
EXTRACT DPECW Initialized 2011-04-07 14:17 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint File ./dirdat/cw000000
First Record RBA 0
GGSCI> alter dpecw, extseqno 365, extrba 4558731
EXTRACT altered.
GGSCI> info dpecw
EXTRACT DPECW Initialized 2011-04-07 14:17 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Log Read Checkpoint File ./dirdat/cw000365
First Record RBA 4558731
GGSCI> start dpecw
Sending START request to MANAGER ...
EXTRACT DPECW starting
GGSCI (ora5502) 31> info dpecw
EXTRACT DPECW Last Started 2011-04-07 14:18 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:29 ago)
Log Read Checkpoint File ./dirdat/cw000365
First Record RBA 4558731
谢谢大神,mark一下 本帖最后由 zhuang3088 于 2014-4-11 17:01 编辑
今天看了下过程,处理思路就是删除队列重新添加,然后继续之前RBA号传输,很受用
页:
[1]