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: Asynchronous trigger processing in Oracle

Re: Asynchronous trigger processing in Oracle

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Fri, 09 Jul 2004 14:14:10 GMT
Message-ID: <SKxHc.47801$MB3.18210@attbi_s04>

"Alex Voitik" <idebeinder_at_tut.by> wrote in message news:8d0f28f3.0407090240.7530ddb7_at_posting.google.com...
> Hi,
>
> could anyone explain how Oracle executes triggers,
> namely if a trigger is fired in asynchronous mode
> or not? Maybe it is tuneable?
>
> For example, there is a trigger defined as
>
> CREATE OR REPLACE TRIGGER Convert_Transaction
> AFTER INSERT OR UPDATE ON TB_TRANSACTIONS
> FOR EACH ROW
> BEGIN
> --
> --code which may be time-consumimg
> --
> END;
>
> This is the only trigger defined for the table.
>
> Will Oracle allow inserts in the table
> TB_TRANSACTIONS if the processing of trigger
> from the previous INSERT is not finished?
> If so, will the trigger for this new INSERT
> be fired?
>
> The behaviour i need is to allow inserts while
> processing the previous "after insert" trigger,
> but to block trigger execution if another trigger
> is still executing, i.e. to make a queue of triggers
> waiting their time to fire.
>
> Can Oracle provide such behaviour with triggers?
> Maybe i should look for another solution?
>
> Thanks for the help!

Each session inserting into the table will fire the trigger. They won't wait on each other. You could use the dbms_lock package if you want to wait and have the trigger wait if there is a lock. Not really sure what you are trying to do.
Jim Received on Fri Jul 09 2004 - 09:14:10 CDT

Original text of this message

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