批量重建不可用索引

-- Created on 2012-5-24 by ADMINISTRATOR

declare
  cursor jl is select * from user_indexes a where a.status='UNUSABLE';
begin
   for r in jl loop
     execute immediate 'alter index '||r.index_name ||' rebuild';
   end loop;
end;

发表评论

电子邮件地址不会被公开。