ITPub博客

首页 > 数据库 > Oracle > ONLINE方式在线重建索引异常中断后遇到ORA-08104错误的处理思路

ONLINE方式在线重建索引异常中断后遇到ORA-08104错误的处理思路

Oracle 作者:kunlunzhiying 时间:2018-01-29 16:34:42 0 删除 编辑
select i.obj#, i.flags, u.name, o.name, o.type#  
  from sys.obj$ o, sys.user$ u, sys.ind_online$ i  
 where (bitand(i.flags, 256) = 256 or bitand(i.flags, 512) = 512)  
   and (not ((i.type# = 9) and bitand(i.flags, 8) = 8))  
   and o.obj# = i.obj#  
   and o.owner# = u.user#;  


declare  
isClean boolean;  
begin  
isClean := FALSE;  
while isClean=FALSE loop  
isClean := dbms_repair.online_index_clean(前一步查出的object_id);  
dbms_lock.sleep(2);  
end loop;  
exception  
when others then  
RAISE;  
end;  
/   
http://blog.csdn.net/haibusuanyun/article/details/50236057 

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

请登录后发表评论 登录
全部评论
IT搬砖

注册时间:2014-07-28

  • 博文量
    665
  • 访问量
    568705