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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-04091 Table is mutating, trigger/function may not see it

Re: ORA-04091 Table is mutating, trigger/function may not see it

From: Jarek Mosiejewski <Jarowa_at_netspace.net.au>
Date: Sun, 3 May 1998 01:21:49 +1000
Message-ID: <6ifdkm$snm$1@otis.netspace.net.au>

>Our idea was to write an insert trigger on the staging table. The insert
>trigger would do some preliminary checking, and, if all was OK, it would
>then call the existing set of stored procedures. This is where things go
>bad. When I insert a row onto my staging table, the trigger fires. The
>trigger then correctly calls the stored procedure. But as soon as my stored
>procedure does an update against the staging table, the "ORA-04091 table is
>mutating" error occurs.

I got this problem when there was referential integrity enabled via foreign key between the table with the trigger and another table that the trigger was attempting to update. In my case I had an update trigger that was inserting a record into an audit table. I ended up removing the foreign key between the two tables.

Regards

Jarek Received on Sat May 02 1998 - 10:21:49 CDT

Original text of this message

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