Rebuild All Indexes on a Schema in Oracle

spool index_rebuild.sql
select 'alter index '||owner||'.'||index_name ||' rebuild online nologging;'
from dba_indexes
where owner=upper('SAMPLE');
spool off


Category: DatabaseSQLUncategorized



  1. What about partitioned indexes?
    Btw, it’s faster to rebuild in parallel. And don’t forget to restore the value of degree after rebuild.

  2. You actually make it seem really easy with your presentation but I to find this topic to be actually something that I think I might never understand. It kind of feels too complex and extremely wide for me. I am looking forward on your next post, I’ll attempt to get the hold of it!

Leave a Reply

Article by: Shadab Mohammad