Delete Dataguard Archivelog
真實環境下的archivelog delete指令碼:
PrimaryDB:
crontab -l
00 12 * * * sh /data1/fullbackup/rman_del/rman_del.sh ------------------此時DB負載相對較小
strings rman_del.sh
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export TMPDIR=/tmp
export ORACLE_BASE=/home/oracle
export ORACLE_SID=hmddb1
export ORACLE_HOME=/home/oracle/product/11.2.0/dbhome_1
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/openwin/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export JAVA_HOME=/home/oracle/jre/1.1.8
export JAVA_BINDIR=$JAVA_HOME/bin
export SDK_HOME=$JAVA_HOME
export JDK_HOME=$JAVA_HOME
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5
#export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export THREADS_FLAG=native
rman target / log=/data1/fullbackup/rman_del/rman_del.log.`date +%Y%m%d%H%M%S` @/data1/fullbackup/rman_del/rman_del.run --------------利用RMAN刪除歸檔的日誌,另外還可以通過判斷archivelog是否被 standby應用來清理
strings rman_del.run
DELETE NOPROMPT ARCHIVELOG until time 'sysdate-7; ------------------------------------主庫儲存規劃為1.5TB 每日的archivelog大約在50G
StandbyDB:
crontab -l
00 17:20 * * * sh /home/oracle/admin/rman_del.sh
strings rman_del_sh
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export TMPDIR=/tmp
export ORACLE_BASE=/home/oracle
export ORACLE_SID=hmddb1
export ORACLE_HOME=/home/oracle/product/11.2.0/dbhome_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5
#export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export THREADS_FLAG=native
rman target / log=/home/oracle/admin/rman_del.log @/home/oracle/admin/rman_del.run
strings rman_del.run
DELETE NOPROMPT ARCHIVELOG until time 'sysdate-15; ------------------------------------------standby儲存規劃為3T,fullbackup 保留2份,archivelog保留半個月(另外histDB 2TB)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24867586/viewspace-712883/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- backup archivelog delete input 與delete all input 區別Hivedelete
- BACKUP ARCHIVELOG with DELETE INPUT or DELET all..Hivedelete
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- ASM 中使用RMAN delete archivelog until time刪除歸檔檔案ASMdeleteHive
- Oracle歸檔空間不足,delete archivelog all;命令失效時解決方法OracledeleteHive
- RMAN delete archivelog命令刪除歸檔日誌及歸檔日誌拷貝deleteHive
- 解析一下DataGuard環境裡出現archivelog gap的兩個場景Hive
- Restore ArchivelogRESTHive
- [20131115]archivelog產生太快dataguard磁碟滿的問題解決.txtHive
- 配置ARCHIVELOG 模式Hive模式
- RMAN - backup archivelog all 與 backup database plus archivelog 區別HiveDatabase
- rman restore archivelog logRESTHive
- [zt] crosscheck archivelog allROSHive
- 轉至archivelog模式Hive模式
- delete input 與 delete all inputdelete
- delete OBSOLETE 與 delete expirieddelete
- deletedelete
- delete 和 delete [] 的真正區別delete
- Oracle OCP(58):ARCHIVELOG 管理OracleHive
- Archivelog & Noarchivelog mode in RMANHive
- 測試RMAN的backup archivelog all delete input會不會刪除還未傳輸到備庫的歸檔日誌Hivedelete
- delete與delete[]需要注意的地方delete
- FormData delete()ORMdelete
- URLSearchParams delete()delete
- JavaScript deleteJavaScriptdelete
- DELETE STATISTICSdelete
- 【Dataguard】DataGuard運維注意事項運維
- rman 中delete 與delete force 的區別delete
- restore archivelog 的各種用法RESTHive
- restore archivelog 的各種用法RESTHive
- DataGuard broker之一:DataGuard broker簡介
- DataGuard SwitchOver
- DataGuard搭建
- oracle dataguardOracle
- MySQL Delete PHPMySqldeletePHP
- WeakMap delete() 方法delete
- WeakSet delete() 方法delete
- Map delete() 方法delete