corrupt block导致rman备份失败

用rman备份测试库的时候报错,信息如下:
RMAN> backup database;
Starting backup at 12-MAR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/opt/app/oracle/oradata/goolen/sysaux01.dbf
input datafile file number=00001 name=/opt/app/oracle/oradata/goolen/system01.dbf
input datafile file number=00003 name=/opt/app/oracle/oradata/goolen/undotbs01.dbf
input datafile file number=00006 name=/opt/app/oracle/oradata/goolen/goolen01.dbf
channel ORA_DISK_1: starting piece 1 at 12-MAR-14
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/12/2014 10:46:35
ORA-19566: exceeded limit of 0 corrupt blocks for file /opt/app/oracle/oradata/goolen/system01.dbf
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 12-MAR-14
channel ORA_DISK_1: finished piece 1 at 12-MAR-14
piece handle=/opt/app/oracle/product/11.2.0/dbs/1qp3008c_1_1 tag=TAG20140312T104550 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/12/2014 10:46:35
ORA-19566: exceeded limit of 0 corrupt blocks for file /opt/app/oracle/oradata/goolen/system01.dbf

可以看出,在rman进行备份的时候,system01.dbf检测到了坏块,导致rman备份失败
dbv检测一下这个文件,确实有坏块
[oracle@localhost rman]$ dbv file=/opt/app/oracle/oradata/goolen/system01.dbf
DBVERIFY: Release 11.2.0.1.0 - Production on Wed Mar 12 10:53:02 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
DBVERIFY - Verification starting : FILE = /opt/app/oracle/oradata/goolen/system01.dbf
Page 85960 is marked corrupt
Corrupt block relative dba: 0x00414fc8 (file 1, block 85960)
Bad header found during dbv: 
Data in bad block:
 type: 16 format: 2 rdba: 0x00414fc8
 last change scn: 0x55eb.f659e7a3 seq: 0x1 flg: 0x04
 spare1: 0xf5 spare2: 0xc8 spare3: 0x0
 consistency value in tail: 0xe7a31001
 check value in block header: 0xac1c
 computed block checksum: 0x0

DBVERIFY - Verification complete


Total Pages Examined         : 93440
Total Pages Processed (Data) : 63507
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 12703
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 3593
Total Pages Processed (Seg)  : 1
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 13636
Total Pages Marked Corrupt   : 1
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 5032842 (0.5032842)

查一下这个坏块属于哪个对象
SQL> SELECT tablespace_name,segment_type,owner,segment_name
  2  FROM dba_extents
  3  WHERE file_id = &file_id
  4  AND &block_id between block_id AND block_id+blocks-1;
Enter value for file_id: 1
old   3: WHERE file_id = &file_id
new   3: WHERE file_id = 1
Enter value for block_id: 85960
old   4: AND &block_id between block_id AND block_id+blocks-1
new   4: AND 85960 between block_id AND block_id+blocks-1

no rows selected

SQL> select *
  2    from dba_free_space
  3   where file_id = &file_id
  4     and &block_id between block_id and block_id + blocks - 1;
Enter value for file_id: 1
old   3:  where file_id = &file_id
new   3:  where file_id = 1
Enter value for block_id: 85960
old   4:    and &block_id between block_id and block_id + blocks - 1
new   4:    and 85960 between block_id and block_id + blocks - 1

no rows selected

这个坏块应该是未被格式化的块,对于未格式化的块,是比较容易恢复的
copy一个临近的未格式化的块,覆盖就行
BBED> copy file 1 block 85961 to file 1 block 85960;
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 File: /opt/app/oracle/oradata/goolen/system01.dbf (1)
 Block: 85960            Offsets:    0 to  511           Dba:0x00414fc8
------------------------------------------------------------------------
 06a20000 c94f4100 e9c51500 00000106 22f50000 01000000 d6210100 53c51500 
 00000000 03000200 00000000 ffff0000 00000000 00000000 00000000 00800000 
 53c51500 01001000 03030000 7509c000 c1004d00 5820b000 e9c51500 00000000 
 00000000 00000000 00000000 00000000 00000000 00015800 ffffc200 7c017803 
 28040000 58003d1f f01ea61e 5b1e0c1e c01d6a1d 1e1dd11c 851c2b1c e01b961b 
 421bf51a a91a5d1a 121ac519 7b193119 e4189718 4d180218 b5176b17 1a17cd16 
 7a162e16 e2159615 4a15fd14 b4145e14 0f14c213 72132813 dc129112 4612fa11 
 ad116311 1711c910 7f103410 e70f9a0f 4d0f000f b40e670e 0d0ebe0d 700d200d 
 d00c830c 340ce50b 9b0b510b 060bb50a 660a150a c4097a09 2d09da08 8e08d404 
 88043e04 f203a603 58030803 b8026702 1402c901 7c01002c 020e0353 59530649 
 5f53594e 31ffff02 c14e0549 4e444558 07786d08 0f011136 07786d08 0f011136 
 13323030 392d3038 2d31353a 30303a31 363a3533 0556414c 4944014e 014e014e 
 02c1052c 020e0353 59530d49 5f545950 45445f56 49455731 ffff02c1 4d05494e 
 44455807 786d080f 01113607 786d080f 01113613 32303039 2d30382d 31353a30 
 303a3136 3a353305 56414c49 44014e01 4e014e02 c1052c02 0e035359 5307495f 
 56494557 31ffff02 c14c0549 4e444558 2c020e03 53595307 495f4e54 414231ff 
 
 BBED> m /x c8 offset 4
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
 File: /opt/app/oracle/oradata/goolen/system01.dbf (1)
 Block: 85960            Offsets:    4 to  515           Dba:0x00414fc8
------------------------------------------------------------------------
 c84f4100 e9c51500 00000106 2ff50000 01000000 d6210100 53c51500 00000000 
 03000200 00000000 ffff0000 00000000 00000000 00000000 00800000 53c51500 
 01001000 03030000 7509c000 c1004d00 5820b000 e9c51500 00000000 00000000 
 00000000 00000000 00000000 00000000 00015800 ffffc200 7c017803 28040000 
 58003d1f f01ea61e 5b1e0c1e c01d6a1d 1e1dd11c 851c2b1c e01b961b 421bf51a 
 a91a5d1a 121ac519 7b193119 e4189718 4d180218 b5176b17 1a17cd16 7a162e16 
 e2159615 4a15fd14 b4145e14 0f14c213 72132813 dc129112 4612fa11 ad116311 
 1711c910 7f103410 e70f9a0f 4d0f000f b40e670e 0d0ebe0d 700d200d d00c830c 
 340ce50b 9b0b510b 060bb50a 660a150a c4097a09 2d09da08 8e08d404 88043e04 
 f203a603 58030803 b8026702 1402c901 7c01002c 020e0353 59530649 5f53594e 
 31ffff02 c14e0549 4e444558 07786d08 0f011136 07786d08 0f011136 13323030 
 392d3038 2d31353a 30303a31 363a3533 0556414c 4944014e 014e014e 02c1052c 
 020e0353 59530d49 5f545950 45445f56 49455731 ffff02c1 4d05494e 44455807 
 786d080f 01113607 786d080f 01113613 32303039 2d30382d 31353a30 303a3136 
 3a353305 56414c49 44014e01 4e014e02 c1052c02 0e035359 5307495f 56494557 
 31ffff02 c14c0549 4e444558 2c020e03 53595307 495f4e54 414231ff ff02c15a 

 <32 bytes per line>

BBED> sum apply
Check value for File 1, Block 85960:
current = 0xf523, required = 0xf523

SQL> alter system flush buffer_cache;

System altered.

SQL> alter system flush buffer_cache;

System altered.

SQL> exit

[oracle@localhost bbed]$ dbv file=/opt/app/oracle/oradata/goolen/system01.dbf
DBVERIFY: Release 11.2.0.1.0 - Production on Wed Mar 12 11:20:56 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
DBVERIFY - Verification starting : FILE = /opt/app/oracle/oradata/goolen/system01.dbf

DBVERIFY - Verification complete


Total Pages Examined         : 102400
Total Pages Processed (Data) : 71991
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 12702
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 3312
Total Pages Processed (Seg)  : 1
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 14395
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 5039195 (0.5039195)

RMAN> backup database;

Starting backup at 12-MAR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/opt/app/oracle/oradata/goolen/system01.dbf
input datafile file number=00002 name=/opt/app/oracle/oradata/goolen/sysaux01.dbf
input datafile file number=00003 name=/opt/app/oracle/oradata/goolen/undotbs01.dbf
input datafile file number=00006 name=/opt/app/oracle/oradata/goolen/goolen01.dbf
channel ORA_DISK_1: starting piece 1 at 12-MAR-14
channel ORA_DISK_1: finished piece 1 at 12-MAR-14
piece handle=/opt/app/oracle/product/11.2.0/dbs/1rp3029l_1_1 tag=TAG20140312T112124 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 12-MAR-14
channel ORA_DISK_1: finished piece 1 at 12-MAR-14
piece handle=/opt/app/oracle/product/11.2.0/dbs/1sp302ao_1_1 tag=TAG20140312T112124 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-MAR-14

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值