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: import recreates proliferates same check constraints

Re: import recreates proliferates same check constraints

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 21 Dec 2001 21:02:11 +0000
Message-ID: <3C23A353.2B0F@yahoo.com>


David Heitholt wrote:
>
> Back 5 days before Sept 11, 2001 dan_at_nospam.com initiated a thread
> (Subject: ccol$) in which Jonathan Lewis (3rd message) observed that
> when you refresh data by truncating tables and re-importing, Oracle
> will not recognize the existence of equal check constraints and will
> re-create the check constraint all over again. Here is an excerpt
> from his message:
>
> &#8220;If you keep refreshing data by truncating and importing,
> then some classes of constraints that you have defined
> will be re-created each time you do the import.&#8221;
>
> My question is: Why does Oracle allow its Import utility to behave in
> this manner? Is this considered a known bug that Oracle may remedy in
> a future release? Does anyone have a recommended tested approach to
> refreshing data and objects and at the same time avoiding this
> proliferation of the same check constraints ?
>
> The proliferating check constraint phenomenon was also noted in a
> thread initiated by Stan Brown (stanb_at_panix.com Subject: Confused
> about "check" style constraunts Date: 2001-08-21 06:54:45 PST):
> &#8220;So, it appears that soehow (perhaps export/import ?) I have
> created many extra constraints on some of my tables (I was able to
> replicate the probelm on a different table). So, any sugestions as to
> how to clean this mess up?&#8221; The thread became frozen before
> anyone responded to his question.
>
> Thanks in advance for your help !
>
> --
> David Heitholt
> Agency.com

It is actually a user 'error' that causes multiple constraints. It only happens when you don't name your constraint - hence they get system generated names. Import cannot allow these to be used in case they clash with an existing constraint name...

If you name your constraints, then it won't be a hassle

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Fri Dec 21 2001 - 15:02:11 CST

Original text of this message

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