-
index rebuild
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='<OWNER NAME>' ;
SQL> spool off
open the "rebuild.lst" file
remove all the lines excepting those starting with "alter"
save the file as <filename>.sql
Now Run the file
SQL> @<filename>.sql
Suvashish
-
There is a small correction in the last post
SQL> owner='<OWNER_NAME>';
Suvashish
-
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|