以前写了一个 不知道被谁删除了 ,昨天又重复工作,今天记录下来备份省的下次重写
一、系统参数
hpux 16G内存、4核cpu
二、物理定时删除
contab -e
0 2 * * * find /home/sxtsiomsArc -mtime +15 -exec rm -f {} \;
45 3 * * * /oradata/scripts/delarchivelog.sh
三、逻辑删除
delarchivelog.sh 内容如下:
export ORACLE_HOME='/arch/oracle/product/10.2';
export ORACLE_SID='sxtsioms';
/arch/oracle/product/10.2/bin/rman target sys/sys123 cmdfile=/oradata/scripts/deletelog.sh log=/oradata/scripts/delarchivelog.log;
deletelog.sh内容:
run{
allocate channel cha1 type disk;
crosscheck archivelog all;
delete noprompt expired archivelog all;
release channel cha1;
}
exit;
备注:当不需要交叉验证时用DELETE noprompt ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-10';即可
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/ONLYONE_HTLIU/archive/2010/08/06/5793768.aspx
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25088941/viewspace-681854/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25088941/viewspace-681854/