删除归档日志脚本如下:
[[email protected] 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
[[email protected] oracle]$
原文地址:http://blog.51cto.com/tongcheng/2067996
时间: 2024-10-14 20:07:34