From: Vasileios Lourdas <Vasileios.Lourdas@eurodyn.com>
Newsgroups: comp.databases.oracle
Subject: Re: Export/import in Oracle 8.1.6 EE
Date: Thu, 12 Dec 2002 16:49:03 +0200
Organization: GRNET, Greece
Lines: 46
Message-ID: <3DF8A1DF.3689DDF8@eurodyn.com>
References: <3DF89E25.4603DF6B@eurodyn.com>
NNTP-Posting-Host: static10548.static.hol.gr
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-7
Content-Transfer-Encoding: 7bit
X-Trace: nic.grnet.gr 1039704453 18041 195.97.105.48 (12 Dec 2002 14:47:33 GMT)
X-Complaints-To: abuse@grnet.gr
NNTP-Posting-Date: Thu, 12 Dec 2002 14:47:33 +0000 (UTC)
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en


Well, i've just discovered, that when creating a table in user_a and you
give a name for the primary key constraint, then the import has the
behaviour i describe below. However, if you don't provide a name for the
primary key and Oracle uses its "default" name, SYSxxxxxxxxx or
something similar, then the import utility creates the primary key
normally, just as it is in the first user. What a nice import bug!

Anyway, i'm sure i'm not the first one to step into this. Can anyone
help me how to override this problem?


Vasileios Lourdas wrote:
> 
> Hello,
> 
> I have a user (user_a) in Oracle 8.1.6 EE on a Linux server and i want
> to create a second user (user_b) having the same objects as user_a
> (objects+data). So, i figured i could use the export and import
> utilities.
> I export user_a with the following command line:
> 
>   exp userid=system/manager@thes file=user_a.dmp owner=user_a
> 
> and i get the user_a.dmp export file. To import to user_b, i use the
> following command:
> 
>   imp userid=system/manager@thes file=user_a.dmp fromuser=user_a
> touser=user_b ignore=y
> 
> During the import, after all tables with their rows have been imported,
> i get the following messages :
> 
> IMP-00003: ORACLE error 2270 encountered
> ORA-02270: no matching unique or primary key for this column-list
> 
> Other than that, the import finishes. Browsing through user_b's objects,
> i discover that all tables, instead of having primary and foreign keys,
> they have unique indexes to enforce the uniqueness of the columns that
> are supposed to be the primary keys.
> 
> I did a search in Metalink, but have not found any relevant information
> on this one. I don't understand why this procedure fails, the export,
> import and Oracle versions are all the same!
> 
> TIA,
> Vasilis

