加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

RMAN 中delete exipired 和 delete obsolete 的区别

发布时间:2020-12-12 13:59:02 所属栏目:百科 来源:网络整理
导读: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 fro

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/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读