删除归档日志脚本如下:
[oracle@orcl oracle]$ vim del_archive.log
#!/bin/bash
export ORACLE_SID=oggmaster --实例名
/u01/app/oracle/product/11.2.0/dbhome_1/bin/rman log=/var/log/archive_orcl.log <<EOF
connect target /
crosscheck archivelog all;
delete NOPROMPT expired archivelog all;
delete noprompt archivelog all completed before 'sysdate-10'; --保留10天的归档
exit;
EOF
[oracle@orcl oracle]$
本文转自 z597011036 51CTO博客,原文链接:http://blog.51cto.com/tongcheng/2067996,如需转载请自行联系原作者