Re: Mutating Table, Trigger Problem...Need Help!!

From: Doris Jetz <djetz_at_spots.ab.ca>
Date: 1996/06/26
Message-ID: <4qrjlh$f4h_at_nr1.vancouver.istar.net>#1/1


kittu_at_gis.eng.hawaii.edu (Chakravarthy Nalamotu) wrote:

>Hi Oracle Users,
>I am getting this ORA 04091 when I run my trigger.
 

>I have a very simple after insert trigger on the
>'PARENT' table, which inserts a new record
>in the 'CHILD' table.
 

>This is giving an error:
>ORA-04091: table OWNER.PARENT is mutating,
> trigger/function may not see it

I had a similar problem.

When I talked to Oracle tech support, they said it was because I hadn't commited the first insert. Because the parent table was in the middle of a change while inserting into the child table (which would fire the integrity checking on the parent), the trigger was finding it (the parent) to be mutating and the trigger failed. I had to rewrite my trigger into a function and find an appropriate place to call it from.

Hope this helps

Doris Jetz

Oracle DBA/Developer
NGX Canada Inc.
Calgary, AB Received on Wed Jun 26 1996 - 00:00:00 CEST

Original text of this message