rman 中delete 与delete force命令的区别

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:208

rman 中delete 与delete force 的区别

假设你的备份集被OS命令删掉了,
这时候delete这个备份集是删不掉的,必须用delete 删除的话,先要用crosscheck 一下,标识expired 才可以
但delete force可以省略crosscheck 这一步 直接删除

delete obsolete 是根据策略来删除过期的备份 这个前天条件必须在对应介质中能找到 才可删除成功
而delete force obsolete 是强制删除 如果对应介质也找不到 也可删除成功

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 88 02-JUN-08
Backup Piece 88 02-JUN-08 D:BACKUP2SJHUB4S_1_1
Backup Set 89 02-JUN-08
Backup Piece 89 02-JUN-08 D:BACKUPC-799229701-20080602-0D

Backup Set 90 04-JUN-08
Backup Piece 90 04-JUN-08 D:BACKUP2UJI2QFK_1_1
Backup Set 91 04-JUN-08
Backup Piece 91 04-JUN-08 D:BACKUPC-799229701-20080604-00

Archive Log 255 03-JUN-08 D:ARCHPAULPUBTEST_1_14.DBF
Archive Log 256 04-JUN-08 D:ARCHPAULPUBTEST_1_15.DBF

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=D:BACKUP2UJI2QFK_1_1 recid=90 stamp=656501236
deleted backup piece
backup piece handle=D:BACKUPC-799229701-20080604-00 recid=91 stamp=656501281
deleted archive log
archive log filename=D:ARCHPAULPUBTEST_1_14.DBF recid=255 stamp=656415230
deleted archive log
archive log filename=D:ARCHPAULPUBTEST_1_15.DBF recid=256 stamp=656498131
Deleted 4 objects

RMAN-06207: WARNING: 2 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
List of Mismatched objects
==========================
Object Type Filename/Handle
--------------- ---------------------------------------------------
Backup Piece D:BACKUP2SJHUB4S_1_1
Backup Piece D:BACKUPC-799229701-20080602-0D

RMAN> delete force obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 88 02-JUN-08
Backup Piece 88 02-JUN-08 D:BACKUP2SJHUB4S_1_1
Backup Set 89 02-JUN-08
Backup Piece 89 02-JUN-08 D:BACKUPC-799229701-20080602-0D

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=D:BACKUP2SJHUB4S_1_1 recid=88 stamp=656354460
deleted backup piece
backup piece handle=D:BACKUPC-799229701-20080602-0D recid=89 stamp=656354486
Deleted 2 objects

RMAN>

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】