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: Import indexfile=blah - What about constraints ?

Re: Import indexfile=blah - What about constraints ?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 09 Aug 1999 22:35:50 +0800
Message-ID: <37AEE746.352D@yahoo.com>


Doug Cowles wrote:
>
> Yes..this annoys me also. You need to run a separate script to get all the
> constraints..
>
> Neil Cudd wrote:
>
> > I'm trying to export a schema from my prod'n db and import into my test
> > server after modifying the initial extent allocation (short on disk space
> > !).
> >
> > I did an import with indexfile='filename' to get the table and index DDL and
> > modified all the initial allocations - no problemo. But I've just noticed
> > that no constraint ddl was generated with the indexfile='filename'.
> > Unfortunately all my primary keys were created as constraints !
> >
> > Any ideas greatly appreciated.
> >
> > Regards,
> >
> > neil.

(assuming unix here)

exp file=xyz rows=n

strings xyz.dmp | grep 'ADD CONSTRAINT' | sed 's/$/\;/g'

looks for constraint defn's and add's a ";" at the end so they can be run in SQL Plus...Chuck another sed clause in and you can also add "unrecoverable" to speed your index builds...

I think its two spaces after the "add"...

otherwise grep for "PRIMARY KEY" etc etc

HTH --



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Mon Aug 09 1999 - 09:35:50 CDT

Original text of this message

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