Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: alter index xy rebuild

Re: alter index xy rebuild

From: Kenneth Koenraadt <plovmand_at_hotmail.com>
Date: Thu, 19 Jul 2001 20:08:14 GMT
Message-ID: <3b573d3d.1833517@news.mobilixnet.dk>

On Thu, 19 Jul 2001 21:23:18 +0200, "Gomber_at_Home" <sgomber_at_adlink.net> wrote:

>Hi all,
>
>i need to rebuild about 150 indices - is there a way to rebuilt them
>automatically like : alter all_indexes rebuild where owner = 'me' ?
>
>thanks a lot
>
>Sven
>
>

A quick and simple way is (in sql*plus) :

spool c:\outfile.sql;
select 'alter index ' || index_name || ' rebuild;' from dba_indexes where owner = 'me';
spool off;

Now, execute c:\outfile.sql, and you are done...but check the file content first, just to be safe ;-)

Regards,
Kenneth Koenraadt
Systems Consultant
Oracle DBA
plovmand@<no-spam>hotmail.com Received on Thu Jul 19 2001 - 15:08:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US