首页 > 数据库 > Oracle > oracle ORA-08104处理



经过:
rebuild索引期间掐掉了,再次rebuild报错。
有其他在使用该索引,并未提交也会造成一样问题。
处理:
方法一、
用dbms_repair.online_index_clean来清除创建索引的失败的遗留
注意:dbms_repair.online_index_clean这个函数一定要有返回值,否则会失败的
declare
isClean boolean;
begin
isClean := FALSE;
while isClean=FALSE loop
isClean := dbms_repair.online_index_clean(368874);
dbms_lock.sleep(2);
end loop;
exception
when others then
RAISE;
end;
/
方法二、有锁先处理锁
select event,count(*) from gv$session_wait where wait_class<>'Idle' group by event;
方法三、手动启动smon
不建议
方法四、(如果即使重启也解决不了)
危险,不是很建议
1、手工删除日志表:
首先找到这个索引的OBJECT_ID:
Select object_id from dba_objects where owner=<owner> and object_name=<index name>;
找到OBJECT_ID后,就可以知道表的名字了(SYS_JOURNAL_<OBJECT_ID>),直接DROP这张表。不过如果这张表上的DML比较频繁,DROP操作可能不会一次成功,需要不停的重试。
2、手工修改IND$:
UPDATE IND$ SET FLAGS=FLAGS-512 WHERE OBJ#=<OBJECT_ID>;
手工清理要十分小心,一旦出错会导致数据字典错误。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69980685/viewspace-3001496/ ,如需转载,请注明出处,否则将追究法律责任。