Re: Mutating Tables Ans Triggers

From: Daniel A. Morgan <Daniel.Morgan_at_attws.com>
Date: Sat, 21 Jul 2001 21:52:43 GMT
Message-ID: <3B292C97.18FB36D9_at_attws.com>


<comments interspersed below>

Xmina wrote:

> We Arrived To a Very Bad Situation.
>
> We Hava Mutating Tables when we have Triggers that must update them, The
> creation of the Triggers are well done however when we try to update that
> tables we btain the dollowing error:

Then the triggers are not "well done" eh. ;-)

> ORA-04091: tabela SCOTT.HORA_EXTRA está em mutação, trigger não a pode
> ler ou modificar
> ORA-06512: na "SCOTT.F_HORA_EXTRA", linha 6
> ORA-06512: na linha 1
> ORA-06512: na "SCOTT.T_HORA_EXTRA_0", linha 8
> ORA-04088: erro durante a execução do trigger 'SCOTT.T_HORA_EXTRA_0'
>
> We obtain the Famous Error ORA-04091. For What we investigated we can do
> the update using not one trigger but three triggers using PACKAGES, but for
> a newbie that is a little bit complicated .
>
> IS There any solution more simple ???
>
> Can You Answer me please ???
>
> xmina_leiria_at_clix.pt

You should perform your updates by passing the values to a stored procedure and let it do all of the work. Stored procedures do not have the problems of triggers and are far easier to debug.

Daniel A. Morgan Received on Sat Jul 21 2001 - 23:52:43 CEST

Original text of this message