if you are on Oracle9i (and I believe it works in 8i as well) It will
still likely take awhile, but that will depend on the amount of data.
set echo off feedback off verify off linesize 100
spool rebuild_indexes.sql
SELECT ' ALTER INDEX ' || owner ||'.' || index_name || ' rebuild
tablespace indx_tbs;'
FROM dba_indexes
WHERE tablespace = 'tbl_tbs';
spool off
@rebuild_indexes.sql
----- Forwarded by Chris Guillaume/cguilla/DFSI on 10/29/2004 08:02 AM
-----
"SIDDY SOWA " <oracledba-ezmlmshield-x47760739.[Email address protected]
10/29/2004 07:44 AM
To: "LazyDBA Discussion" <[Email address protected]
cc:
Subject: Indexes and tables in one tablespace
Hello Evryone,
Thank God its Friday!
But I have a headache, and please help, so that I get
a peaceful weekend.
My developers have placed about 200 indexes in the
same tablespace with about 200 tables.
We all know that this is not a good practice, not at
all. My first thought is to drop the indexes one after
the other and rebuild them in a different tablespace,
say indx_tbs, but this will of course take that long.
Could anyone think of a quicker way of doing this?
My sincere gratitude in advance.
Siddy
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page