RMAN 中delete exipired 和 delete obsolete 的区别

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RMAN 中delete exipired 和 delete obsolete 的区别相关的知识,希望对你有一定的参考价值。

elete expired

If you run CROSSCHECK, and if RMAN cannot locate the files, then it updates their records in the RMAN repository to EXPIRED status. You can then use the DELETE EXPIRED command to remove records of expired backups and copies from the RMAN repository.

delete obsolete

The RMAN DELETE command supports an OBSOLETE option, which deletes backups that are no longer needed to satisfy specified recoverability requirements. You can delete files obsolete according to the configured default retention policy, or another retention policy that you specify as an option to the DELETE OBSOLETE command. As with other forms of the DELETE command, the files deleted are removed from backup media, deleted from the recovery catalog, and marked as DELETED in the control file.

delete expired删除的是那些本来RMAN以为存在但是实际上在磁盘或者磁带上已经被删除了的信息,删除的只是RMAN资料库中的记录;delete obsolete则删除旧于备份保留策略定义的备份数据同时也更新RMAN资料库以及控制文件。

===============================================================

EG:

#delete obsolete and expired backup and archivelog
run {
delete noprompt obsolete;
crosscheck archivelog all;
delete noprompt expired archivelog all;
crosscheck backup;
delete noprompt expired backup;
}

参考博文:http://blog.itpub.net/28389881/viewspace-2076338/

以上是关于RMAN 中delete exipired 和 delete obsolete 的区别的主要内容,如果未能解决你的问题,请参考以下文章

12.2备库rman使用delete删除归档日志报错RMAN-08137: WARNING: archived log not deleted, needed for standby or upstr

RMAN删除备份

用delete命令删除RMAN备份,后续磁盘空间如何释放

DG环境RMAN删除归档报错RMAN-08137: archived log not deleted

Oracle故障处理:Rman delete obsolete报错ORA-19606解决

How to Delete Archivelog Using RMAN in Oracle