ORACLE Rman删除归档日志

删除过期的归档日志:


RMAN> list archivelog all;


手工删除归档日志文件
RMAN> DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';




设置归档日志过期时间:
RMAN>show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;

CONFIGURE RETENTION POLICY TO REDUNDANCY 1;


crosscheck archivelog all; 
delete expired archivelog all; 


一个备份前检测归档日志脚本:
connect target /;
crosscheck archivelog all;
run {
    allocate channel ch1 device type disk ;
    report schema;
    crosscheck backup of database;
    crosscheck backup of archivelog all;
    crosscheck backup of controlfile;
    crosscheck backup of spfile;
    crosscheck archivelog all;
    delete noprompt force expired backup;
    delete noprompt force expired archivelog until time 'sysdate-0.5';
    delete noprompt force expired copy;
    delete noprompt force obsolete;
    report need backup;
    report unrecoverable;
    release channel ch1;
}





你可能感兴趣的:(ORACLE,备份恢复)