测试时,误删rman备份文件,用delete backup;命令删除报错,网上搜了一下,执行change backup crosscheck;检查一下即可删除,小记之。
详细信息如下:
RMAN> delete backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1 1 1 1 AVAILABLE DISK /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp
2 2 1 1 AVAILABLE DISK /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_CC_7tprzqdr_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 05/10/2012 14:57:16
ORA-19501: read error on file "/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp", block number 1 (block size=512)
ORA-27069: attempt to do I/O beyond the range of the file
Additional information: 1
Additional information: 2048
RMAN> change backup crosscheck;
using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp RECID=1 STAMP=782923403
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_CC_7tprzqdr_.bkp RECID=2 STAMP=782923511
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_TAG20120510T151411_7tptxpmo_.bkp RECID=3 STAMP=782925494
Crosschecked 3 objects
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 1.04G DISK 00:01:43 10-MAY-12
BP Key: 1 Status: EXPIRED Compressed: NO Tag: CC
Piece Name: /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 594638 10-MAY-12 /u01/oradata/test/system01.dbf
2 Full 594638 10-MAY-12 /u01/oradata/test/sysaux01.dbf
3 Full 594638 10-MAY-12 /u01/oradata/test/undotbs01.dbf
4 Full 594638 10-MAY-12 /u01/oradata/test/users01.dbf
5 Full 594638 10-MAY-12 /u01/oradata/test/example01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 9.36M DISK 00:00:01 10-MAY-12
BP Key: 2 Status: EXPIRED Compressed: NO Tag: CC
Piece Name: /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_CC_7tprzqdr_.bkp
SPFILE Included: Modification time: 10-MAY-12
SPFILE db_unique_name: test
Control File Included: Ckp SCN: 594678 Ckp time: 10-MAY-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 9.36M DISK 00:00:14 10-MAY-12
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20120510T151411
Piece Name: /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_TAG20120510T151411_7tptxpmo_.bkp
SPFILE Included: Modification time: 10-MAY-12
SPFILE db_unique_name: test
Control File Included: Ckp SCN: 596234 Ckp time: 10-MAY-12
RMAN> delete backup;
using channel ORA_DISK_1
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1 1 1 1 EXPIRED DISK /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp
2 2 1 1 EXPIRED DISK /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_CC_7tprzqdr_.bkp
3 3 1 1 AVAILABLE DISK /u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_TAG20120510T151411_7tptxpmo_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_nnndf_CC_7tprwc2m_.bkp RECID=1 STAMP=782923403
deleted backup piece
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_CC_7tprzqdr_.bkp RECID=2 STAMP=782923511
deleted backup piece
backup piece handle=/u01/flash_recovery_area/test/backupset/2012_05_10/o1_mf_ncsnf_TAG20120510T151411_7tptxpmo_.bkp RECID=3 STAMP=782925494
Deleted 3 objects