ITPub博客

ORA-01578错误,导致drop table 错误 (一)

原创 Linux操作系统 作者:paulyibinyi 时间:2007-12-12 18:02:02 0 删除 编辑
在自己测试库上,删除一个表时,出现以下错误:
SQL> drop table test;
drop table test
*
ERROR 位于第 1 行:
ORA-00604: 递归 SQL 层 1 出现错误
ORA-01578: ORACLE 数据块损坏(文件号1,块号12936)
ORA-01110: 数据文件 1: 'D:\ORACLE\ORADATA\TEST\SYSTEM01.DBF'

出现ora-01578错误,查下错误代码解释
ORA-01578 ORACLE data block corrupted (file # string, block # string)


Cause: The data block indicated was corrupted, probably due to program errors.

Action: Determine which object was corrupted using a command like the following:

SELECT SEGMENT_TYPE,OWNER||'.'||SEGMENT_NAME FROM DBA_EXTENTS
WHERE file = FILE_ID AND block BETWEEN BLOCK_ID AND BLOCK_ID+BLOCKS -1;


where values for file and block are from the message.

Try to restore the segment containing the block indicated. This may involve dropping the segment and re-creating it. If there is a trace file, report the errors in it to Oracle Support Services.

执行解释中的sql,这里的块号和文件号就是上面出现错误的数字
select segment_type,owner||'.'||segment_name
from dba_extents
where 1 = file_id and 12936 between block_id and block_id+blocks -1;
segment_type owner||'.'||segment_name
index SYS.I_DEPENDENCY1

是索引,那就不怕了,重建索引就ok了,那要是segment_type为table了,那就麻烦点,要修复块
alter index SYS.I_DEPENDENCY1 rebuild online;

SQL> drop table test;

表已丢弃。

正常

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

请登录后发表评论 登录
全部评论
oracle 10g ocm oracle 10g/11g/12c ocp aix 6.1 administrator,ogg expert,ITSS 技术交流群 201703254 微信公众号 paulyibin 探讨技术,开心工作 电话 13719354869 ,深入研究数据库和开始研究big data

注册时间:2007-12-11

  • 博文量
    905
  • 访问量
    6482341