Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-04091 Table is mutating, trigger/function may not see it
>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