declare sql_txt varchar(1000);
begin
for idx_name in(select index_name from dba_indexes where owner='STG' and temporary='N' and index_type<>'LOB') loop
begin
sql_txt:='alter index STG.'||idx_name.index_name||' rebuild online PARALLEL 4 nologging';
execute immediate sql_txt;
end;
end loop;
end;
/
declare sql_txt varchar(1000);
begin
for idx_name in(select index_name from dba_indexes where owner='ABPPMGR' and temporary='N'and index_type<>'LOB') loop
begin
sql_txt:='alter index ABPPMGR.'||idx_name.index_name||' rebuild online PARALLEL 4 nologging';
execute immediate sql_txt;
end;
end loop;
end;
/