rman备份文件误删

     测试时,误删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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值