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 -> parent keys not found?

parent keys not found?

From: Stefanita Vilcu <vsv_at_dnt.ro>
Date: Thu, 02 Dec 1999 12:12:08 +0200
Message-ID: <384645F8.301FEE04@dnt.ro>


hello,

I am trying to add a foreign key to a table but I receive:

SQL> ALTER TABLE PLATI ADD CONSTRAINT fk_PLATI_pid FOREIGN KEY (pid) REFERENCES PRIMA (pid);
  ALTER TABLE PLATI ADD CONSTRAINT fk_PLATI_pid FOREIGN KEY (pid) REFERENCES PRIMA (pid)
*
ERROR at line 1:
ORA-02298: cannot enable (DNTB.FK_PLATI_PID) - parent keys not found

The parent key exists and is enabled. Is there anything elese I should do?

TIA -vsv

SQL> select * from all_constraints where constraint_name='PK_PRIMA_PID';

OWNER                          CONSTRAINT_NAME                C
TABLE_NAME                    
SEARCH_CONDITION                                                                
R_OWNER                        R_CONSTRAINT_NAME              DELETE_RU
STATUS   DEFERRABLE     DEFERRED  VALIDATED     GENERATED      BAD
LAST_CHAN
------------------------------ ------------------------------ -
------------------------------
--------------------------------------------------------------------------------
------------------------------ ------------------------------ ---------
-------- -------------- --------- ------------- -------------- ---
DNTB                           PK_PRIMA_PID                   P
PRIMA                                                                                                                                                                                  
ENABLED  NOT DEFERRABLE IMMEDIATE VALIDATED     USER NAME         
02-DEC-99 Received on Thu Dec 02 1999 - 04:12:08 CST

Original text of this message

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