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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ora imp

Re: ora imp

From: Stronfogg <philmulhall_at_gmail.com>
Date: 19 Feb 2006 00:18:37 -0800
Message-ID: <1140337117.714398.302980@g43g2000cwa.googlegroups.com>

Jim Kennedy wrote:
> "MD" <md_at_md.com> wrote in message news:virJf.94163$4l5.71944_at_dukeread05...
> > Hi,
> > I'm running the imp on an existing schema on 9i and I get unique
> constraint
> > errors. What I want is to overwrite all data and not merge the data. Is
> this
> > a flag in the imp function or is this something in the exp function.
> >
> > Thanks,
> > MarkD
> >
> >
> You can truncate the current table and import into that. (replace the data
> which exp/imp is designed for.)
> You could rename the current table and import and then insert the
> non-matching rows back in.
> Jim

If using imp, use the parameter:

ignore=Y

this should ignore any errors (eg constraint violations) and continue processing the records.

Also, you may choose to 'bad' file parameter - this will record the records that violated the constraint into the indicated flat file which you can use for further processing.

Another option is to disable the constraint on the target table prior to the upload so that the constraint does not get violated so all records go into the table. You can then perform post import clean up on the table (ie delete constraint violating records) then enable the constraint. Or if you don't care about the duplicates, then enable the constraint with the 'NOVALIDATE' option. It will not enforce the constraint for current records in the table but will enforce the constraint for furture DML.

HTH Phil. Received on Sun Feb 19 2006 - 02:18:37 CST

Original text of this message

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