-- 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;