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: Are PL/SQL tables transaction safe?

Re: Are PL/SQL tables transaction safe?

From: TDHoward <thoward_at_hercii.mar.lmco.com>
Date: Thu, 21 May 1998 13:08:05 -0400
Message-ID: <35645F74.FC47465E@hercii.mar.lmco.com>


The compiled form of the program (trigger) is held in hte shared pool. A private area is allocated to hold values -- including local variable values --
specific to the session.

Connect Computer wrote:

> I am writing triggers to update history tables and have encountered the
> dreaded 'mutating table' error. To get around that, I have created a
> package with variables, a row trigger to save the key and a statement
> trigger to affect the changes.
>
> My question is about the PL/SQL package variables. I am using a counter to
> index the variables. At the first execution of the row trigger, I set it to
> 1. If multiple rows are affected, I increment the counter. In the statement
> trigger, I loop through, do my work and reset the index to 0.
>
> Is this safe within a transaction? Can these package variables be accessed
> concurrently by more than one trigger? The only code against these
> variables is in the trigger.
>
> I have scoured the Oracle doco and haven't come up with any definitive
> explanation. Can anyone help me answer this?
>
> Thanks.

--
TDHoward Received on Thu May 21 1998 - 12:08:05 CDT

Original text of this message

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