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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Missing foreign key

RE: Missing foreign key

From: Kirsh, Gary <gary.kirsh_at_gs.com>
Date: Tue, 18 Jul 2000 12:37:16 -0400
Message-Id: <10562.112290@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01BFF0D6.6F17EDD0
Content-Type: text/plain;

        charset="iso-8859-1"

David,
Was the export taken from a V7 database? Gary  

Gary Kirsh
Next Extent, Inc.

-----Original Message-----
From: David Barbour [mailto:DBarbour_at_connectsouth.com] Sent: Tuesday, July 18, 2000 11:59 AM
To: Multiple recipients of list ORACLE-L Subject: RE: Missing foreign key

Chuck,  

Ran into something similar this weekend. I was doing an import after dropping all constraints and truncating all tables. On import, I specified INGNORE=Y, but received the following message:  

    . . importing table                     "GLOBDATA"      14851 rows
imported
IMP-00017: following statement failed with ORACLE error 2261:
"ALTER TABLE "GLOBDATA" ADD CONSTRAINT "UNQ_INDEX" UNIQUE
("GDET_UI_ID_INDE"

"X") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 266240
N"
"EXT 126976 MINEXTENTS 1 MAXEXTENTS 121 PCTINCREASE 50 FREELISTS 1 FREELIST
"
"GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USER_DATA" ENABLE "
IMP-00003: ORACLE error 2261 encountered ORA-02261: such unique or primary key already exists in the table

Despite the error, the constraint was created, and the data load was successful. Just for grins and giggles, I dropped all the tables, and re-ran the import. THAT returned this error, plus errors on every foreign key.  

Anybody else?    

David A. Barbour
Oracle DBA - ConnectSouth
512-681-9438
dbarbour_at_connectsouth.com

-----Original Message-----
From: Chuck Hamilton [mailto:chuck_hamilton_at_yahoo.com] Sent: Tuesday, July 18, 2000 8:40 AM
To: Multiple recipients of list ORACLE-L Subject: Missing foreign key

Anyone ever encounter a situation where you've had missing parent keys but the foreign key constraint is still enabled? What caused it? We have that situation right now on an 8i database.


Do You Yahoo!?
Get Yahoo! <http://mail.yahoo.com/> Mail - Free email you can access from anywhere!

------_=_NextPart_001_01BFF0D6.6F17EDD0
Content-Type: text/html;

        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.00.2722.2800" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000>David,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000>Was 
the export taken from a V7 database?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=940483016-18072000></SPAN></FONT><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000>Gary</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000>Gary 
Kirsh</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=940483016-18072000>Next 
Extent, Inc.</SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> David Barbour   [mailto:DBarbour_at_connectsouth.com]<BR><B>Sent:</B> Tuesday, July 18, 2000   11:59 AM<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</B>   RE: Missing foreign key<BR><BR></DIV></FONT>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000>Chuck,</SPAN></FONT></DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000></SPAN></FONT>&nbsp;</DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=751200814-18072000>Ran   into something similar this weekend.&nbsp; I was doing an import after   dropping all constraints and truncating all tables.&nbsp; On import, I   specified INGNORE=Y, but received the following message:</SPAN></FONT></DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000></SPAN></FONT>&nbsp;</DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000>&nbsp;&nbsp;&nbsp; . . importing   table&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   "GLOBDATA"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14851 rows imported<BR>IMP-00017:   following statement failed with ORACLE error 2261:<BR>&nbsp;"ALTER TABLE   "GLOBDATA" ADD&nbsp; CONSTRAINT "UNQ_INDEX" UNIQUE   ("GDET_UI_ID_INDE"<BR>&nbsp;"X") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS   255 STORAGE(INITIAL 266240 N"<BR>&nbsp;"EXT 126976 MINEXTENTS 1 MAXEXTENTS 121   PCTINCREASE 50 FREELISTS 1 FREELIST "<BR>&nbsp;"GROUPS 1 BUFFER_POOL DEFAULT)   TABLESPACE "USER_DATA" ENABLE "<BR>IMP-00003: ORACLE error 2261   encountered<BR>ORA-02261: such unique or primary key already exists in the   table<BR></SPAN></FONT></DIV>
  <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000>Despite the error, the constraint was created, and   the data load was successful.&nbsp; Just for grins and giggles, I dropped all   the tables, and re-ran the import.&nbsp; THAT returned this error, plus errors   on every foreign key.&nbsp;</SPAN></FONT></DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000></SPAN></FONT>&nbsp;</DIV>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000>Anybody else?</DIV></SPAN></FONT>   <DIV><FONT color=#0000ff face=Arial size=2><SPAN   class=751200814-18072000>&nbsp;</DIV></SPAN></FONT>   <DIV>&nbsp;</DIV>
  <P><FONT face=Arial size=2>David A. Barbour</FONT> <BR><FONT face=Arial
  size=2>Oracle DBA - ConnectSouth</FONT> <BR><FONT face=Arial 
  size=2>512-681-9438</FONT> <BR><FONT face=Arial 
  size=2>dbarbour_at_connectsouth.com</FONT> </P>
  <BLOCKQUOTE>
    <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma     size=2>-----Original Message-----<BR><B>From:</B> Chuck Hamilton     [mailto:chuck_hamilton_at_yahoo.com]<BR><B>Sent:</B> Tuesday, July 18, 2000     8:40 AM<BR><B>To:</B> Multiple recipients of list     ORACLE-L<BR><B>Subject:</B> Missing foreign key<BR><BR></DIV></FONT>Anyone     ever encounter a situation where you've had missing parent keys but the     foreign key constraint is still enabled? What caused it? We have that     situation right now on an 8i database.<BR><BR>
    <P><BR>
    <HR SIZE=1>
    <B>Do You Yahoo!?</B><BR>Get <A href="http://mail.yahoo.com/">Yahoo! 
Received on Tue Jul 18 2000 - 11:37:16 CDT

Original text of this message

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