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: 10.1 / 10.2: different trigger behaviour

Re: 10.1 / 10.2: different trigger behaviour

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 22 Jan 2007 09:22:14 -0800
Message-ID: <1169486530.880669@bubbleator.drizzle.com>


Tarby777 wrote:

>> Posting the actual error message and possibly the trigger code would
>> make it possible for someone to help you.

>
> OK, thanks. Here's the error:
>
> 716 rows created.
> commit
> *
> ERROR at line 1:
> ORA-02091: transaction rolled back
> ORA-02291: integrity constraint (CHS.LIBRARYCONNECTOR_FK) violated -
> parent key not found

The error message says it all. This has nothing to do with a trigger. You are attempting to put records into a table that has a referential constraint protecting it from bad data owned by the CHS schema and named LIBRARY_CONNECTOR_FK. The value you are trying to insert, or update to, is not present in the parent table.

SELECT t.owner CHILD_OWNER,

t.table_name CHILD_TABLE,
t.constraint_name FOREIGN_KEY_NAME,
r.owner PARENT_OWNER,
r.table_name PARENT_TABLE,
r.constraint_name PARENT_CONSTRAINT

FROM user_constraints t, user_constraints r WHERE t.r_constraint_name = r.constraint_name
AND t.r_owner = r.owner
AND t.constraint_type='R'
AND t.table_name = <child_table_name>;
-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon Jan 22 2007 - 11:22:14 CST

Original text of this message

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