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/
,如需转载,请注明出处,否则将追究法律责任。