假设你的备份集被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>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-331128/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7199859/viewspace-331128/