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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Altering Indexes

Re: Altering Indexes

From: Kent Wayson <waysonkw_at_mail.milwaukee.k12.wi.us>
Date: Tue, 27 Nov 2001 08:23:45 -0800
Message-ID: <F001.003CDA88.20011127072023@fatcity.com>

I've never heard of a "mass move index" utility. What I did in a similar situation is script it, with something like this:

SET head OFF feed ON echo OFF verify OFF pagesize 0 linesize 65 trimspool on

--
spool ind_fix.sql
--
select 'alter index '||index_name||' rebuild '
||CHR(10)||' tablespace  <ts name here>'
||CHR(10)||' storage (<storage stuff here>);'
from user_indexes
/
--
spool off
--
SET head ON feed ON echo ON verify ON pagesize 50 linesize 200


Then run the generated script.  This was on a database with over 2300
indexes (and 1400 tables).  Most weren't that large, so it didn't take too
long.  I was doing this to put the indexes in a tablespace with uniform
extent sizes, so the storage parameters were the same for every index.


Kent



>I have this large DB (approx. 250 tables) that has the tables and indexes in
>the same tablespace (not my design). Is there a way I can move all of the
>indexes to a separate tablespace en-mass? I know I can move them one at a
>time with the alter index command, but that would be rather time consuming.
>
>Thanks,
>Ken Janusz, CPIM
>Database Conversion Lead
>Sufficient System, Inc.
>Minneapolis, MN
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Kent Wayson INET: waysonkw_at_mail.milwaukee.k12.wi.us Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Received on Tue Nov 27 2001 - 10:23:45 CST

Original text of this message

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