删除归档日志脚本如下:
[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]$
原文链接:https://www.f2er.com/oracle/206488.html