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: Commands Used to Create Existing Contraint and Index

Re: Commands Used to Create Existing Contraint and Index

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sun, 1 Aug 2004 06:09:29 +1000
Message-ID: <410bfc51$0$28538$afc38c87@news.optusnet.com.au>

"Michael" <melliott42_at_yahoo.com> wrote in message news:91721cf.0407310807.72126b51_at_posting.google.com...
> >> Or have I missed the point
> What you posted was helpful...thanks.
>
> I was trying to figure out how to find the syntax used to create an
> EXISTING Index and Constraint. Any suggestions?

Ah, now I understand.. If this was 9i, you could perhaps use dbms_metadata to see how to re-construct an index. But since you are stuck on 8i, your best bet is to use export/import. When you export a table and its indexes, the resulting 'create table' and 'create index' statements are written into an export dump file. You could use a text editor to open the dump file and simply read its contents for the relevant bit of syntax you're after (though the dump file is actually a binary file, and cannot be edited in a text editor, there's no harm in merely looking at it with one). Or you could pretend to do an import (rows=n, ignore=y, indexfile=nameoffile.txt) which will actually generate a true text file containing the relevant create table statements (all commented out) and the associated create index statements (not commented out, and thus immediately usable as part of a SQL script).

Regards
HJR
>
> Thanks again,
>
> Michael
Received on Sat Jul 31 2004 - 15:09:29 CDT

Original text of this message

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