ENTERPRISE EDITION :
select 'alter index '||owner||'.'||index_name ||' rebuild online nologging;' from dba_indexes;
select 'alter index '||owner||'.'||index_name ||' rebuild online nologging;' from dba_indexes where owner=upper('DBA_FID');
STANDARD EDITION :
select 'alter index '||owner||'.'||index_name ||' rebuild nologging;' from dba_indexes;
select 'alter index '||owner||'.'||index_name ||' rebuild nologging;' from dba_indexes where owner=upper('DBA_FID');