- 最后登录
- 2017-5-4
- 在线时间
- 81 小时
- 威望
- 999
- 金钱
- 2391
- 注册时间
- 2013-9-11
- 阅读权限
- 150
- 帖子
- 1124
- 精华
- 5
- 积分
- 999
- UID
- 1220
|
1#
发表于 2013-10-22 00:17:30
|
查看: 8428 |
回复: 2
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号码, [thread n]
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
|
|