rman 中delete 與delete force 的區別

paulyibinyi發表於2008-06-04

假設你的備份集被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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章