我有一个服务器,安装的是oracle8.0.5的数据库版本,但今天操作时报错ora-1578,我查看了一下alert文件,发现是一个为rbems.dbf中有坏块,而下面是1578错误提示,但我该如何在无任何数据备份的情况下,删除块,重建块呢?有哪位高人遇到过,请赐教,不胜感激......
01578, 00000, "ORACLE data block corrupted (file # %s, block # %s)"
// *Cause: The data block indicated was corrupted, mostly due to software
// errors.
// *Action: Try to restore the segment containing the block indicated. This may involve dropping the segment and recreating it. If there
// is a trace file, report the errors in it to your ORACLE
// representative.
---------------------------------------------------------------
在初始化参数文件中加上这两句:
event = "10231 trace name context forever,level 10"
event = "10233 trace name context forever,level 10"
头一个事件指定在进行全表扫描时跳过损坏的块,第二个事件指定在进行index range scan时跳过损坏的块。然后把表倒出。
另使用dbms_repair也可以,还有使用bbed也可以,这是Oracle本身提供的工具,不过很烦的。
如果能上metalink的话,可以到那儿的论坛上找一下ora-01578
---------------------------------------------------------------
大森林来帮帮你吧:
首先需说明的是你坏块中的数据一定是丢失了,但可以把除坏块外好块(block)中的数据提取出来,我处理这种问题的一惯做法如下:
1、首先确认是什么坏了(索引、表、回滚段还是临时段),及哪个段坏了。
以dba用户连入oracle
SQL>Select owner,segment_name,segment_type from dba_extents where file_id=
1<f> and <b> between block_id and block_id+blocks-1;(<f>和<b>分别是ORA-01578报出的坏块出现的文件号和块号)
22、如果是索引段或临时段坏了,删了重建就可以,这里不说了,看你的情况也不是回滚段坏了,下面对表中出现坏块的处理方法说一下。
33、对表坏块的处理。
4a、以表的owner连入oracle
5b、sql>ALTER SYSTEM SET EVENTS ‘10231 trace name context forever,level 10’;
6c、创建一个临时表:SQL>create table errortemp as select * from error;(error是坏表的表名)
7d、rename坏表,把临时表rename成坏表的表名
8sql>alter table error rename to error_bak;
9sql>alter table errortemp rename to error;
10e、在表创建索引、约束、授权、trigger等对象.
114、利用表之间的业务关系,把坏块中的数据补足。
12
13
14\---------------------------------------------------------------
15
16ORACLE官方的回答
17
18[NOTE:28814.1]</b></f></b></f>