实验步骤.TXT (1.75 KB)
tt用户下 有七张表,
t4 表出现了坏块,其他六张能过正常访问
SQL> select count(*) from t4;
select count(*) from t4
*
ERROR 位于第 1 行:
ORA-01578: ORACLE 数据块损坏(文件号11,块号853)
ORA-01110: 数据文件 11: 'D:OPTORA9ORADATAORA9TT.DBF'
下面是我坏块的恢复步骤
1、
SQL> conn /as sysdba
已连接。
SQL> Execute DBMS_REPAIR.SKIP_CORRUPT_BLOCKS('TT','T4');
PL/SQL 过程已成功完成。
SQL>
2、
倒出t4表
exp tt/tt file=d: 4.dmp tables=t4
3、
SQL> conn tt/tt
已连接。
SQL> drop table t4;
表已丢弃。
4、
导入刚才倒出的数据
imp tt/tt file=d: 4.dmp
导入后t4表能正常访问
5、dbv检查
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
D

ptora9BIN>dbv file=D

ptora9oradataora9TT.DBF blocksize=8192
DBVERIFY: Release 9.2.0.1.0 - Production on 星期三 7月 9 21:50:12 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
DBVERIFY - 验证正在开始 : FILE = D

ptora9oradataora9TT.DBF
标记为损坏的页853
***
Corrupt block relative dba: 0x02c00355 (file 11, block 853)
Bad check value found during dbv:
Data in bad block -
type: 6 format: 2 rdba: 0x02c00355
last change scn: 0x0000.00136465 seq: 0x1 flg: 0x04
consistency value in tail: 0x64650601
check value in block header: 0x1acf, computed block checksum: 0xf358
spare1: 0x0, spare2: 0x0, spare3: 0x0
***
DBVERIFY - 验证完成
检查的页总数 :2560
处理的页总数(数据):1860
失败的页总数(数据):0
处理的页总数(索引):0
失败的页总数(索引):0
处理的页总数(其它):10
处理的总页数 (段) : 0
失败的总页数 (段) : 0
空的页总数 :689
标记为损坏的总页数:1
汇入的页总数 :0
D

ptora9BIN>
还报出 页853 损坏,为啥呢? 以上的操作时在Windows 下9.2.0.1的库进行的
[
本帖最后由 xcsars 于 2008-7-10 13:39 编辑 ]