ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-01115坏块恢复

ORA-01115坏块恢复

原创 Linux操作系统 作者:feiyuzitong 时间:2012-07-11 00:01:21 0 删除 编辑
ORA-01115: IO error reading block from file 2324 (block # 64146)
ORA-27070: async read/write failed
SVR4 Error: 5: I/O error

查看是否有offline的数据文件
TEST_USER@TEST:prod SQL> select status,count(1) from v$datafile_header group by status;

STATUS                  COUNT(1)
--------------------- ----------
ONLINE                      4410

查看对应的数据文件
ORACLE@TEST:prod SQL>  select file#,name,status,BLOCKS from v$datafile where file#=2324;
      2324    ONLINE  /oracle/TEST/data27/TESTHITEM_ADM_2007_25.dbf 8192

查看对应的表
TEST_USER@TEST:prod SQL> SELECT SEGMENT_NAME, SEGMENT_TYPE FROM DBA_EXTENTS 
WHERE FILE_ID = 2324 and 64146 BETWEEN BLOCK_ID 
AND BLOCK_ID + BLOCKS - 1;

TEST_USER@TEST:prod SQL> select count(*) from EBAY_ITEM_DESC_ADMIN_TEST_0707;

  COUNT(*)
----------
   4750860

EBAY_ITEM_DESC_ADMIN_TEST_0707  TABLE

使用DBV验证对应的数据库文件
dbv file=/oracle/TEST/data27/TESTHITEM_ADM_2007_25.dbf BLOCKSIZE=8192 > tmp.log

DBVERIFY: Release 10.2.0.3.0 - Production on Mon Jul 9 20:33:25 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

DBVERIFY - Verification starting : FILE = /oracle/TEST/data27/TESTHITEM_ADM_2007_25.dbf


DBVERIFY - Verification complete

Total Pages Examined         : 2048128
Total Pages Processed (Data) : 1990769
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 53100
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 4139
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 120
Total Pages Marked Corrupt   : 3
Total Pages Influx           : 0
Highest block SCN            : 276256622 (852.276256622)

通过拷贝备库对应文件方式恢复
alter database datafile 2324 offline drop;
alter database rename file '/oracle/TEST/data27/TESTHITEM_ADM_2007_25.dbf' to '/oracle/TEST/data28/TESTHITEM_ADM_2007_25.dbf';
recover datafile 2324
alter database datafile  2324 online;
   
之后通过dbv验证,可考虑FTS全表方式双重验证,遇到过DBV本身无法执行的错误,解决方法也是通过备份恢复,所以一句话,不需要有没有备份的数据库存在
   dbv file=/oracle/TEST/data03/TEST_01.dbf BLOCKSIZE=8192 > tmp.log

DBVERIFY: Release 11.2.0.2.0 - Production on Mon Jul 9 22:49:14 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /oracle/TEST/data03/TEST_01.dbf

DBV-00600: Fatal Error - [25] [2155600] [3] [1999072]
   

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22503721/viewspace-735122/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-04-19

  • 博文量
    20
  • 访问量
    69798