Currently I rebuild my indexes one at a time. ALter index rebuild.
Can anyone send me a script that will rebuild all my indexes all at once instead of just one at a time?
Printable View
Currently I rebuild my indexes one at a time. ALter index rebuild.
Can anyone send me a script that will rebuild all my indexes all at once instead of just one at a time?
SQL> spool rebuil.lst
SQL> select 'alter','index',index_name,'rebuild',';'
SQL> from dba_indexes where
SQL> owner='' ;
SQL> spool off
open the "rebuild.lst" file
remove all the lines excepting those starting with "alter"
save the file as.sql
Now Run the file
SQL> @.sql
There is a small correction in the last post
SQL> owner='';
i will post you very good solution soon
set pages 1000
set lines 1000
set echo off
set heading off
set feedback off
spool rebuild.sql
SELECT 'ALTER INDEX '||owner||'.'||index_name||' REBUILD;'
FROM dba_indexes
WHERE owner = 'SCOTT';
spool off
'REBUILD' is not an option on the lower versions of 734. Just a reminder.
I don't know in which 7.3 version it's introduced, but before 7.3.4. It works in 7.3.3.6.
[Edited by akkerend on 02-06-2001 at 01:44 PM]