PURGEOLDEXTRACTS 不能自动删除

来源:互联网 发布:lol解封软件 编辑:程序博客网 时间:2024/05/23 11:47

最近一直被一个问题困扰,在ogg的source端无论如何也无法自动purge,终于解决了!

之前一直纠结在checkpoint上,但是真心不是,因为target可以自动删除,百思不得解。

参考了mos的一篇文档,好久没用竟然忘了mos....
In this Document
Symptoms
Cause
Solution
References
APPLIES TO:


Oracle GoldenGate - Version 10.4.0.0 to 11.2.1.0.3 [Release 10.4.0 to 11.2]
Information in this document applies to any platform.
SYMPTOMS


Example 


Trail files not being purged by the manager. The event parameter is correctly set as


PURGEOLDEXTRACTS ./dirdat/local/migration/jm/jm*, USECHECKPOINTS, MINKEEPDAYS 3


CAUSE


 The cause is due to local and remote trails have same full path filenames. the remote trail number is much smaller than local one, and the remote one was used to check if the local one may be purged.


Best practice is to use unique names for each trail set in the combined configuration.
 You may check the below command to summarize the trail prefixes used by different processes under this manager


GGCSI > info exttrail *


GGCSI > info rmttrail *


SOLUTION


 Solution is to make sure that all trails (Local and Remote) uses different trail prefixes all the time.


In example below, we could observe that Master extract (writing to exttrail) and Pump extract(writing to rmttrail) uses same trail file prefix


GGSCI (lgpwd514) 1> info exttrail *


Extract Trail: ./dirdat/migration/jm/jm
Extract: E_MERC
Seqno: 1194
RBA: 90081793
File Size: 100M


Extract Trail: ./dirdat/migration/jm/jm


Extract: P_MERC
Seqno: 1123
RBA: 31631582
File Size: 100M


Manager checks all checkpoint files and does not differentiate between exttrail/rmttrail so if the names are the same, the trail files are purged based on the sequence numbers of the rmttrails


在我的案例中info exttrail * 竟然有三个


GGSCI (OGG) 3> info exttrail *


       Extract Trail: /oracle/oggrep/dirdat/lt
             Extract: DATAP1
               Seqno: 3244
                 RBA: 2912854
           File Size: 100M


       Extract Trail: /oracle/oggrep/dirdat/lr
             Extract: DATAP1
               Seqno: 0
                 RBA: 0
           File Size: 100M
           
       Extract Trail: /oracle/oggrep/dirdat/lr
             Extract: EXTL1
               Seqno: 3206
                 RBA: 2954775
           File Size: 100M
极度沮丧,怎么会有两个????
GGSCI (OGG) 3> dblogin userid ggs,password ggs


GGSCI (OGG) 3> delete exttrail  /oracle/oggrep/dirdat/lr extract datap1


刹那,动人的画面出现了:
...............
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003079, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3079.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003080, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3080.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003081, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3081.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003082, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3082.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003083, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3083.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003084, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3084.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003085, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3085.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003086, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3086.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003087, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3087.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003088, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3088.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003089, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3089.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003090, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3090.
2015-01-27 20:43:34  INFO    OGG-00957  Oracle GoldenGate Manager for Oracle, mgr.prm:  Purged old extract file /oracle/oggrep/dirdat/lr003091, applying UseCheckPoints purge rule: Oldest Chkpt Seqno 3205 > 3091.

.....................



贴一个双向复制不能自动purge的mos

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=280429664224416&id=967934.1&displayIndex=3&_afrWindowMode=0&_adf.ctrl-state=gby7uc1h9_69#FIX

0 0
原创粉丝点击