Oracle 11g OGG mgr定期清理tail 文件
生活随笔
收集整理的這篇文章主要介紹了
Oracle 11g OGG mgr定期清理tail 文件
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
OGG mgr定期清理tail 文件
2018-06-11 11:58 440 0 原創(chuàng) GoldenGate 本文鏈接:https://www.cndba.cn/leo1990/article/28531. OGG mgr定期清理tail 文件
1.1. 源端操作
1.1.1. 停止mgr進程
GGSCI (cndba) 14> stop mgr Manager process is required by other GGS processes. Are you sure you want to stop it (y/n)? ySending STOP request to MANAGER ... Request processed. Manager stopped.GGSCI (cndba) 15> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER STOPPED EXTRACT RUNNING EXT1 00:00:00 00:00:02 EXTRACT RUNNING PUMP1 00:00:00 00:00:051.1.2. 編輯文件添加參數(shù)
GGSCI (cndba) 20> edit params mgr GGSCI (cndba) 25> view params mgrport 7809 PURGEOLDEXTRACTS ./dirdat/et*, USECHECKPOINTS, MINKEEPHOURS 1 參數(shù)說明:定期清理dirdat路徑下的本地隊列(local trail)。保留期限一個小時,過期后自動刪除。從而控制隊列文件的目錄不會增長過大。1.1.3. 啟動mgr進程
GGSCI (cndba) 21> start mgrManager started.GGSCI (cndba) 24> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING EXTRACT RUNNING EXT1 00:00:00 00:00:01 EXTRACT RUNNING PUMP1 00:00:00 00:00:041.1.4. 查看源端tail 文件
--配置參數(shù)前 [root@www.cndba.cn dirdat]# ll total 21524 -rw-rw-rw- 1 oracle oinstall 1405 Jun 7 16:11 et000000 -rw-rw-rw- 1 oracle oinstall 1016 Jun 7 16:19 et000001 -rw-rw-rw- 1 oracle oinstall 21989956 Jun 7 22:13 et000002 -rw-rw-rw- 1 oracle oinstall 1075 Jun 8 11:18 et000003 -rw-rw-rw- 1 oracle oinstall 2513 Jun 8 18:28 et000004 -rw-rw-rw- 1 oracle oinstall 1416 Jun 8 19:17 et000005 -rw-rw-rw- 1 oracle oinstall 1442 Jun 11 09:16 et000006 -rw-rw-rw- 1 oracle oinstall 1779 Jun 11 09:16 et000007 -rw-rw-rw- 1 oracle oinstall 1175 Jun 9 02:20 ex000000 -rw-rw-rw- 1 oracle oinstall 1322 Jun 9 02:49 ex000001 -rw-rw-rw- 1 oracle oinstall 2513 Jun 9 03:01 ex000002 -rw-rw-rw- 1 oracle oinstall 1350 Jun 9 03:05 ex000003 --配置參數(shù)后 [root@www.cndba.cn dirdat]# ll total 36 -rw-rw-rw- 1 oracle oinstall 1416 Jun 8 19:17 et000005 -rw-rw-rw- 1 oracle oinstall 1442 Jun 11 09:16 et000006 -rw-rw-rw- 1 oracle oinstall 1779 Jun 11 10:07 et000007 -rw-rw-rw- 1 oracle oinstall 1075 Jun 11 10:07 et000008 -rw-rw-rw- 1 oracle oinstall 1175 Jun 9 02:20 ex000000 -rw-rw-rw- 1 oracle oinstall 1322 Jun 9 02:49 ex000001 -rw-rw-rw- 1 oracle oinstall 2513 Jun 9 03:01 ex000002 -rw-rw-rw- 1 oracle oinstall 1350 Jun 9 03:05 ex0000031.2. 目標端操作
1.2.1. 停止mgr進程
GGSCI (cndba) 2> stop mgr Manager process is required by other GGS processes. Are you sure you want to stop it (y/n)? ySending STOP request to MANAGER ... Request processed. Manager stopped.1.2.2. 編輯文件添加參數(shù)
GGSCI (cndba) 4> edit params mgrGGSCI (cndba) 5> view params mgrport 7809 PURGEOLDEXTRACTS ./dirdat/et*, USECHECKPOINTS, MINKEEPHOURS 11.2.3. 啟動mgr進程
GGSCI (cndba) 6> start mgrManager started.GGSCI (cndba) 7> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING REPLICAT RUNNING REP1 00:00:00 00:00:041.2.4. 查看目標端tail文件
----配置參數(shù)前 [oracle@www.cndba.cn ogg]$ cd dirdat [oracle@www.cndba.cn dirdat]$ ll total 21500 drwxr-xr-x 2 root root 4096 Jun 8 11:21 backup -rw-rw-rw- 1 oracle oinstall 1444 Jun 7 16:11 et000000 -rw-rw-rw- 1 oracle oinstall 0 Jun 7 16:19 et000001 -rw-rw-rw- 1 oracle oinstall 21989995 Jun 7 22:14 et000002 -rw-rw-rw- 1 oracle oinstall 1209 Jun 8 11:19 et000003 -rw-rw-rw- 1 oracle oinstall 2682 Jun 11 09:16 et000004 -rw-rw-rw- 1 oracle oinstall 1793 Jun 11 10:07 et000005 -rw-rw-rw- 1 oracle oinstall 1314 Jun 11 10:07 et000006 --配置參數(shù)后 [oracle@www.cndba.cn dirdat]$ ll total 12 drwxr-xr-x 2 root root 4096 Jun 8 11:21 backup -rw-rw-rw- 1 oracle oinstall 1793 Jun 11 10:07 et000005 -rw-rw-rw- 1 oracle oinstall 1314 Jun 11 10:07 et0000061.3. 補充說明
因為測試這里保留1個小時的tail文件, 保留期限7天的tail文件,過期后自動刪除 PURGEOLDEXTRACTS ./dirdat/et*, USECHECKPOINTS,MINKEEPDAYS 7 只保留一個處理過的隊列文件(不建議使用) PURGEOLDEXTRACTS /ggs/dirdat/AA*, USECHECKPOINTS, MINKEEPFILES 1 PURGEOLDEXTRACTS /ggs/dirdat/AA*, USECHECKPOINTS, MINKEEPHOURS 4, &MINKEEPFILES 4 如果MINKEEPHOURS ,MINKEEPDAYS ,MINKEEPFILES 同時使用,如果發(fā)生沖突時,那么系統(tǒng)接受MINKEEPHOURS和MINKEEPDAYS 參數(shù)將對MINKEEPFILES 參數(shù)做忽略。轉(zhuǎn)載于:https://www.cnblogs.com/xibuhaohao/p/10767468.html
總結(jié)
以上是生活随笔為你收集整理的Oracle 11g OGG mgr定期清理tail 文件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 版图设计与仿真
- 下一篇: 安装及配置Maven环境变量