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: Oracle error ORA-04091

Re: Oracle error ORA-04091

From: Lothar Armbruester <lothar.armbruester_at_t-online.de>
Date: Thu, 16 Aug 2001 18:04:46 +0200
Message-ID: <PM00038BA7D56F2A11@hades.none.local>


sateesh wrote:
> Hi,
> I have written a trigger on a table, that deletes a row from
> another
> table. I am getting the error
> ORA-04091: table PROVIDEO.SERVICEUNITPROFILE is mutating,
> trigger/function
> may not see it.
>
> This is my trigger
> CREATE OR REPLACE TRIGGER unit_profile_trigger
> AFTER DELETE
> ON UNIT_PROFILE
> FOR EACH ROW
> BEGIN
> IF DELETING THEN
> DELETE FROM SERVICEUNITPROFILE WHERE UNITPROFILE_Id=:old.ID;
> END IF;
> END;
>
> I cannot see any problem with this one as such. But definetely there
> is a
> problem.
>

Maybe there is a foreign key constraint with on delete cascade on unit_profile?
If not then creating one should make the trigger obsolete.

Hope that helps,
Lothar

-- 
Lothar Armbrüster       | la_at_oktagramm.de
Hauptstr. 26            | la_at_heptagramm.de
D-65346 Eltville        | lothar.armbruester_at_t-online.de
Received on Thu Aug 16 2001 - 11:04:46 CDT

Original text of this message

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