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 ignore primary key

Re: import ignore primary key

From: Manoj Thomas <manoj_at_mac.com>
Date: 2000/06/20
Message-ID: <B57512E4.4D37%manoj@mac.com>#1/1

> From: syarbrou_at_nospam.enteract.com (Steve .)
> Organization: EnterAct Corp.
> Newsgroups: comp.databases.oracle.server
> Date: Tue, 20 Jun 2000 15:32:47 GMT
> Subject: import ignore primary key
>
> I exported the entire database, and also just the user level export.
>
> The scripts form the software company we are using, creates a unique
> primary key each time you run them. Kind of makes it hard to do your
> own replication.
>
> Two questions:
>
> 1. Can you see what the primary key is in the dump file?

import with the following options..

imp indexes=y show=y log=whatever.log

the logfile would contain the scripts for the indexes and tables. No data will be imported

>
> 2. The company that gave us the original scripts, has a program to
> export into a new database, just the data in the tables. I want to
> import the dump back into the original database to try their
> replication scripts. If I do an import using imp, and it keeps
> complaining about the primary key on the row, will all the data still
> import into the database so I can run their own scripts to move the
> data to a new database?
>
> If not, how is the best way to make sure all the data gets put in? Do
> I need to wipe all the tables and let the import recreate them for the
> user? Thanks.

its better to truncate or drop the original data and then import, so you dont have duplicates or annoying errors about primary/unique key.

_manoj
OCP-DBA Received on Tue Jun 20 2000 - 00:00:00 CDT

Original text of this message

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