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

Home -> Community -> Usenet -> c.d.o.server -> Re: creating indexes script

Re: creating indexes script

From: Ed Jennings <jenningse_at_mindspring.com>
Date: 1997/05/08
Message-ID: <337273C1.7413@mindspring.com>#1/1

Eric W. Worden wrote:
>
> anyone have any experience rebuilding their indexes into other
> tablespaces? i'm working on a script, but i'm stuck when it comes to
> composite indexes and how to populate the columns' field in the create
> index statement. this is going to come in handy for 800 indexes.
>
> appreciate the help.
>
> script:
>
> select 'create index ' || U.index_name || ' on ' || U.table_name || ' ('
> ||
> column_name || ', ) ' || 'tablespace MY_INDEXES '
> from user_indexes U, user_ind_columns C
> where U.index_name = C.index_name
>
> --
>
> +------------------------------+
> + Eric Worden +
> + eworden_at_worldramp.net +
> + +
> + 407-306-1343 +
> +------------------------------+

Run an export of the schema with ROWS=N and INDEXES=Y. Then run an import with INDEXFILE=schema_ddl. It's now a simple matter of a little vi and grep to modify the file.

Ed

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~
jenningse_at_mindspring.com
Received on Thu May 08 1997 - 00:00:00 CDT

Original text of this message

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