Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: import constraints and indexes only
Tom,
For indexes do an import with the indexfile=WhatEver.sql
To get a file containing all the constraints at the UNIX prompt do a {cat -v YourDumpFileName | grep "ALTER TABLE" > WhatEver.sql} I usually add a {| grep "PRIMARY KEY"} and {|grep "FOREIGN KEY"} after the {grep "ALTER TABLE"} as you need to do the primary keys first. You need to edit the resulting files and put a ; on the end of each line to make it runable by SQLPlus.
Note the {} brackets are around the actual bits of code and are not part of the code.
Running the contents of these files will not damage any existing constraints/indexes but will build any missing ones.
Hope this helps.
Kind Regards,
Fraser McCallum
MVP Oracle Administration
www.brainbench.com
"Tom" <tomNOSPAM_at_teameazyriders.com> wrote in message
news:T%jH9.2904$oF5.21359851_at_news-text.cableinet.net...
> Hi,
>
> I had a large import that timed out and left a few tables out which i have
> now added with a selective imp. How can i make sure all constraints and
> indexes are present also? Can i do an im= user/pass rows=n indexes=y
> constraints=y file=x ?
>
> thanks
>
> Tom
>
>
Received on Wed Dec 04 2002 - 18:12:20 CST