使用PURGEOLDEXTRACTS設定goldengate自動清除trail file
如果不設定PURGEOLDEXTRACTS引數trail file不會自動被刪除將佔用大量的空間,空間沾滿goldengate將hang,影響複製。PURGEOLDEXTRACTS引數可以被設定在Manager, Extract, and Replicat引數檔案中,oracle建議設定在Manager中。
以下僅介紹在Manager引數檔案中的設定
1 語法
Syntax PURGEOLDEXTRACTS
[, USECHECKPOINTS | NOUSECHECKPOINTS]
[,
[,
2 解釋
Argument Description
USECHECKPOINTS Allows purging after all Extract and Replicat processes are done with
the data as indicated by checkpoints, according to any MINKEEP rules.
NOUSECHECKPOINTS Allows purging without considering checkpoints, based on keeping a
minimum of either:
◆ one file if no MINKEEP rule is used
or...
◆ the number of files specified with a MINKEEP rule.
to keep data.
MINKEEPHOURS
Keeps an unmodified file for at least the specified number of hours.
MINKEEPDAYS
Keeps an unmodified file for at least the specified number of days.
MINKEEPFILES
Keeps at least
for Manager to process maintenance tasks is 10 minutes, as specified
with the CHECKMINUTES parameter (see page 137). Every 10 minutes,
Manager evaluates the PURGEOLDEXTRACTS frequency and conducts the
purge after the
specified interval.
FREQUENCYMINUTES
Sets the frequency, in minutes, with which to purge old trail files. The
default purge frequency is 60 minutes.
FREQUENCYHOURS
Sets the frequency, in hours, at which to purge old trail files.
frequency設定清楚old trail files.間隔時間預設值是CHECKMINUTES
3 控制規則
3.1 USECHECKPOINTS 規則
管理程式清楚這些被CHECKPOINTS表明已經被所有程式檢測過的檔案, 保證資料不丟失,USECHECKPOINTS是預設設定, NOUSECHECKPOINTS引數取消該檢測,生產環境建議設定USECHECKPOINTS
3.2 MINKEEP規則
該規則設定最小儲存時間或檔案數,
最小時間引數:MINKEEPHOURS, MINKEEPDAYS
最小檔案數引數:MINKEEPFILES
如果時間和檔案同時設定, MINKEEPHOURS, MINKEEPDAYS優先順序高於MINKEEPFILES, MINKEEPFILES將被忽略
3.3 兩種規則的組合使用
1 只有USECHECKPOINTS
如果CHECKPOINTS表明都被完成,只保留一個檔案
2 USECHECKPOINTS+MINKEEP
兩個功能同時生效
3 只有NOUSECHECKPOINTS
預設只保留一個檔案
4 NOUSECHECKPOINTS+MINKEEP
按照MINKEEP規則執行忽略CHECKPOINTS效驗
常用設定
PURGEOLDEXTRACTS /ggs/dirdat/AA*, USECHECKPOINTS, MINKEEPDAYS 2
4 示例
[oraogg@ylptnode1 ggate]$ ls -l /u01/ggate/dirdat/lt*
-rw-rw-rw- 1 oraogg oinstall 9999887 Oct 29 10:32 /u01/ggate/dirdat/lt000000
-rw-rw-rw- 1 oraogg oinstall 9999747 Oct 29 17:01 /u01/ggate/dirdat/lt000001
-rw-rw-rw- 1 oraogg oinstall 9999836 Oct 29 17:01 /u01/ggate/dirdat/lt000002
-rw-rw-rw- 1 oraogg oinstall 9999892 Oct 29 17:01 /u01/ggate/dirdat/lt000003
-rw-rw-rw- 1 oraogg oinstall 9999701 Oct 30 16:03 /u01/ggate/dirdat/lt000004
-rw-rw-rw- 1 oraogg oinstall 8810570 Oct 30 16:03 /u01/ggate/dirdat/lt000005
/u01/ggate/dirdat/lt:
total 0
[oraogg@ylptnode1 ggate]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 10g on Oct 4 2011 23:54:04
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
Source端
GGSCI (ylptnode1) 1> info all
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
EXTRACT RUNNING DPUMP 00:00:00 00:00:06
EXTRACT RUNNING EXT1 00:00:00 00:00:04
GGSCI (ylptnode1) 2> stop manager
Manager is already stopped.
GGSCI (ylptnode1) 3> info all
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
EXTRACT RUNNING DPUMP 00:00:00 00:00:07
EXTRACT RUNNING EXT1 00:00:00 00:00:05
GGSCI (ylptnode1) 4> edit params mgr
PORT 7809
PURGEOLDEXTRACTS /u01/ggate/dirdat/lt*, USECHECKPOINTS, MINKEEPHOURS 2
~
~
~
~
~
~
"dirprm/mgr.prm" 2L, 81C written
GGSCI (ylptnode1) 5>
GGSCI (ylptnode1) 5> start manager
Manager started.
GGSCI (ylptnode1) 6> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DPUMP 00:00:00 00:00:08
EXTRACT RUNNING EXT1 00:00:00 00:00:04
GGSCI (ylptnode1) 7> exit
[oraogg@ylptnode1 ggate]$ ls -l /u01/ggate/dirdat/lt*
-rw-rw-rw- 1 oraogg oinstall 8810570 Oct 30 16:03 /u01/ggate/dirdat/lt000005
[oraogg@ylptnode1 ggate]$ date
Thu Oct 31 16:30:07 CST 2013
Target端
[oraogg@ylptnode2 ggate]$ ls -l /u01/ggate/dirdat/lt*
-rw-rw-rw- 1 oraogg oinstall 9999921 Oct 29 10:32 /u01/ggate/dirdat/lt000000
-rw-rw-rw- 1 oraogg oinstall 9999781 Oct 29 17:01 /u01/ggate/dirdat/lt000001
-rw-rw-rw- 1 oraogg oinstall 9999870 Oct 29 17:01 /u01/ggate/dirdat/lt000002
-rw-rw-rw- 1 oraogg oinstall 9999926 Oct 29 17:01 /u01/ggate/dirdat/lt000003
-rw-rw-rw- 1 oraogg oinstall 9999735 Oct 30 16:03 /u01/ggate/dirdat/lt000004
-rw-rw-rw- 1 oraogg oinstall 8810604 Oct 30 16:03 /u01/ggate/dirdat/lt000005
/u01/ggate/dirdat/lt:
total 0
[oraogg@ylptnode2 ggate]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x86, 32bit (optimized), Oracle 10g on Oct 4 2011 23:54:04
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (ylptnode2) 1> STOP MANAGER
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)? Y
Sending STOP request to MANAGER ...
Request processed.
Manager stopped.
GGSCI (ylptnode2) 2> edit params mgr
PORT 7809
PURGEOLDEXTRACTS /u01/ggate/dirdat/lt*, USECHECKPOINTS, MINKEEPHOURS 2
~
~
~
"dirprm/mgr.prm" 2L, 81C written
GGSCI (ylptnode2) 3> start manager
Manager started.
GGSCI (ylptnode2) 4> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING REP1 00:00:00 00:00:08
GGSCI (ylptnode2) 5> exit
[oraogg@ylptnode2 ggate]$ ls -l /u01/ggate/dirdat/lt*
-rw-rw-rw- 1 oraogg oinstall 8810604 Oct 30 16:03 /u01/ggate/dirdat/lt000005
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15747463/viewspace-775433/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- About the Oracle GoldenGate TrailOracleGoAI
- Android Studio 設定自動清除無效 importAndroidImport
- Mac電腦如何設定自動清除廢紙簍?Mac
- Mac新手教程:Mac廢紙簍如何設定自動清除?Mac
- 使用Docker自動設定PostgreSQLDockerSQL
- 使用 crontab 設定 Homebrew 自動更新
- GoldenGate 自動化初始資料Go
- 處理OGG-02198 Incompatible record (logical EOF) in trail fileAI
- 使用JavaScript設定Tab欄自動切換JavaScript
- Windows 設定 FRP 自動啟動WindowsFRP
- SingleFile 自動儲存設定
- 自動設定autotrace環境
- ppt自動播放怎麼設定 ppt如何設定自動播放下一頁
- win10自動鎖定如何設定_win10系統怎麼設定自動鎖屏Win10
- Python如何設定自動補全?Python
- excel如何設定自動換行?Excel
- GoldenGate Logdump基本使用Go
- win10如何設定自動鎖定螢幕_win10設定自動鎖屏的步驟Win10
- 電腦自動關機怎麼設定 win10怎麼設定自動關機Win10
- win10如何設定自動登入 win10設定自動登入的方法Win10
- win10 自動登入如何設定_windows10自動登入的設定步驟Win10Windows
- centos7 設定tomcat自啟動CentOSTomcat
- 如何設定自動獲取ip地址
- centos自動登入帳號設定CentOS
- win10怎麼自動開啟自動設定時間_win10開啟自動設定時間的步驟Win10
- windows10自動關機程式碼怎麼設定_windows10自動關機的設定方法Windows
- Linux配置JavaEE環境 Linux中安裝JDK、Tomcat、mysql 設定Tomcat自啟動、設定mysql自啟動LinuxJavaJDKTomcatMySql
- C#給自動屬性設定預設值C#
- Android:平臺自動設定Pinctrl的預設配置Android
- wps自動儲存時間設定在哪裡 WPS如何設定自動儲存
- word設定頁碼在哪裡 word設定自動連續頁碼
- win10怎麼設定shutdown自動關機_win10如何使用自動關機shutdown命令Win10
- Vim中設定括號自動補全
- 設定開機自啟動nginx和httpdNginxhttpd
- eclipse中文版自動補全設定Eclipse
- 如何設定自動化測試斷言?
- Ubuntu 設定開機自啟動指令碼Ubuntu指令碼
- 如何設定HTTP自動跳轉到HTTPSHTTP
- w10怎麼設定自動關機_w10如何定時自動關機