Home » SQL & PL/SQL » SQL & PL/SQL » Integrity Constraint error
Integrity Constraint error [message #195066] Tue, 26 September 2006 16:26 Go to next message
Messages: 20
Registered: April 2006
Junior Member
We're using Oracle 10g and are receing the following error message:

[SSI Error: STD208 - Oracle SQL Error: ORA-02291: integrity constraint (BLUE.ARRFOREIGN) violated - parent key not found ORA-06512: at "BLUE.PLISTREFADDRESSESADMIN61114", line 6 ]

The error occurs when we go to add a new entry to the refrences table. From the error I suspect a parent key doesnt exist to match the refrence table's foregin key? The problem Im having, even with the use of Oracle's fabulous Sql Developer IDE for Windows is Im unable to see the table relationships to confirm any of this. I have no clue what table this reference table is related to or even able to see those very constraint items listed anywhere.

Can someone please help me through this issue.

Thank you.

UPDATE: I performed an EDIT TABLE and checked all the tabs and found no Foreign Key listed however a single primary key was defined on the ID column

[Updated on: Tue, 26 September 2006 16:43]

Report message to a moderator

Re: Integrity Constraint error [message #195093 is a reply to message #195066] Wed, 27 September 2006 01:15 Go to previous messageGo to next message
Messages: 20965
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, if Oracle says that the referential integrity constraint is violated, I guess you should believe it Smile

Such a query might show which table is involved into the parent-child relationship:
SELECT c.table_name, o.column_name
 WHERE c.constraint_name = (SELECT c1.r_constraint_name
                              FROM USER_CONSTRAINTS c1
                             WHERE c1.constraint_name = 'ARRFOREIGN')
   AND o.constraint_name = c.constraint_name;
Re: Integrity Constraint error [message #195106 is a reply to message #195066] Wed, 27 September 2006 01:59 Go to previous messageGo to next message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
To see the RI (and all other) constraints in SQL Developer:
1) Go to the connections panel and expand the schema you wish to look in.
2) Expand Tables.
3) Click on the table you wish to look at. A new tab will appear on the right hand half of the screen containing the details of this table
4) Click on the the Constraints tab on this new tables Tab
This will show you all the constraints currently defined on this table.
Re: Integrity Constraint error [message #198020 is a reply to message #195066] Fri, 13 October 2006 19:09 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
not trying to be rude... Do you not have access to plain jane sqlplus? do some simple querying and forget all those fancy "gui" tools. Please excuse me if I assume you don't know the following:

desc dba_constraints (or all or user)
desc dba_cons_columns "

The error message gives the constraint name being violated.

Good luck Kevin
Previous Topic: Table Type list from a schema
Next Topic: time difference between two date
Goto Forum:

Current Time: Sun Jan 22 04:36:56 CST 2017

Total time taken to generate the page: 0.05325 seconds