Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: alter index xy rebuild
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
![]() |
![]() |