4 Replies Latest reply: Aug 26, 2014 5:53 PM by rp0428 RSS

    Rebuild all indexes for a specific schema table

    2738642

      Hi Guys..

       

      Now I am working in 11g

       

      My question is this: there is a built-in PL/SQL Package in the database to rebuild all indexes for a specific schema table ?

       

      I know I can do it by sqlplus in this way described down but what I need is a PL/SQL package that can do it.

       

      I repeat the question: there is an out of the box package inside oracle that rebuild all indexes for a specific schema table?

       

       

      SQL> select 'alter index '||owner||'.'||index_name ||' rebuild online nologging;'
        2 from dba_indexes
        3 where owner=upper('OE') and table_name='MYTABLE';
      ...

      ...

      Thanks