Script to Rebuild an Index in a Schema in Oracle Database






Script:

SET PAGESIZE 0
SET LINESIZE 100
SET FEEDBACK OFF
SET VERIFY OFF
spool index_rebuild_script.sql
select 'alter index '||owner||'.'||index_name ||' rebuild online parallel 4 nologging;'
from dba_indexes
where owner=upper('USERS');
spool off



If you like please follow and comment