但是RMAN仍然有這些檔案的記錄,此時進入RMAN刪除相關會發生錯誤,可依下列方法刪除:
1、查詢目前的備份記錄
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- ---
955 B 0 A DISK 14-MAR-11 1 1 BACKUPL0
956 B 0 A DISK 14-MAR-11 1 1 BACKUPL0
957 B 0 A DISK 14-MAR-11 1 1 BACKUPL0
2、交叉檢查實際狀況,例如編號955的實體檔案已經被刪除了
RMAN> crosscheck backup;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=42 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/ora2/backup/ORCL_Lv0_20110314_963_1.db recid=949 stamp=745790405
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/ora2/backup/ORCL_Lv0_20110314_962_1.db recid=950 stamp=745790405
crosschecked backup piece: found to be 'AVAILABLE'
(略…)
3、重新查詢目前的備份記錄
RMAN> list backup summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- ---
955 X 0 A DISK 14-MAR-11 1 1 BACKUPL0
956 B 0 A DISK 14-MAR-11 1 1 BACKUPL0
957 B 0 A DISK 14-MAR-11 1 1 BACKUPL0
此時會發現編號955的類別為X,表示無效的備份
4、刪除無效的備份
RMAN> delete backupset 955;