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: ORA-04091 trigger mutation

Re: ORA-04091 trigger mutation

From: damorgan <damorgan_at_exesolutions.com>
Date: Fri, 22 Mar 2002 17:25:35 GMT
Message-ID: <3C9B6911.C4A5BA6F@exesolutions.com>


You can not delete records from the table on which you have the trigger ... nor should you even be trying. Rethink your architecture or (you can do it but I wouldn't as a first option) make the trigger an autonomous transaction.

I must confess, however, that your table names really bother me. They look a lot like you have some very real architecture issues. If you have other tables with names like int_audiences1103 and int_audiences1207 you need to get someone that understands how to design relational databases to help you out of the mess you are creating. If not ... just ignore this last comment.

Daniel Morgan

yamaha wrote:

> Here is my trigger:
>
> create or replace trigger test
> before
> update of status
> on int_audiences_1102
> for each row
> when (new.status = 3)
>
> begin
> delete activity_aud_group_map where audience_member_id = :new.aud_id
> and activity_aud_group_id in
> (select activity_aud_group_id from interaction_aud_groups where
> interaction_id = 1102);
> delete int_aud_list_1102 where aud_id = :new.aud_id;
> delete int_audiences_1102 where aud_id = :new.aud_id;
>
> delete int_tag_value_1102 where aud_id = :new.aud_id;
>
> end;
>
> I get the mutate error because of this line :
>
> delete int_audiences_1102 where aud_id = :new.aud_id;
>
> what can I do to fix this...thanks
Received on Fri Mar 22 2002 - 11:25:35 CST

Original text of this message

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