Re: getting DDL for all indexes on a table (using dbms_metadata.get)

From: joel garry <>
Date: Tue, 20 May 2008 14:10:28 -0700 (PDT)
Message-ID: <>

On May 20, 1:10 pm, GS <> wrote:
> A table in a database has 146 columns and 76 indexes on it, most of the
> indexes are unused, I suspect.  I'm not sure why, but most of these were
> (likely) from when developers had access to the database and were adding
> an index everytime they thought it might do some good.  I want see which
> of these are being used at all, and drop the ones that aren't, but I
> want to generate the DDL for all the indexes on the table  so if need be
> I can restore them.
> I used to use a tool (I think it was called DB Artisan or something like
> that) that would do this, but don't have it available anymore and in any
> case would just as soon learn the sql syntax for doing this. I have done
> some research on dbms_metadata.get and see how I can generate ddl for a
> specific table, but I want it to generate all the ddl for all indexes on
> a given table, is this possible?
> database is
> thanks in advance


You can also use the exp/imp utilities with the show option to make a script file.


-- is bogus.
Received on Tue May 20 2008 - 16:10:28 CDT

Original text of this message