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

Advertisements

2 thoughts on “Rebuild All Indexes on a Schema in Oracle

  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.

    Like

  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!

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s