Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Altering Indexes
Ken
set head off
spool c:\index.sql
select 'alter index '|| index_name ||' rebuild tablespace index'
from user_indexes
this would create the script file to rebuild the index
This is the output
alter index S_INVENTORY_PRODID_WARID_PK rebuild tablespace index alter index S_ITEM_ORDID_ITEMID_PK rebuild tablespace index alter index S_ORD_ID_PK rebuild tablespace index alter index S_PRODUCT_ID_PK rebuild tablespace index alter index S_REGION_ID_PK rebuild tablespace index
You execute this script file from sqlplus
Luck,
Ramon E. Estevez
com.banilejas_at_codetel.net.do <mailto:com.banilejas_at_codetel.net.do>
809-565-3121
-----Mensaje original-----
De: root_at_fatcity.com [mailto:root_at_fatcity.com]En nombre de Ken Janusz
Enviado el: Tuesday, 27 November, 2001 9:25 AM
Para: Multiple recipients of list ORACLE-L
Asunto: Altering Indexes
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: Ken Janusz INET: ken.janusz_at_sufsys.com 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-LReceived on Tue Nov 27 2001 - 10:09:01 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ramon Estevez INET: com.banilejas_at_codetel.net.do 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).
![]() |
![]() |