Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: asynchronous PL/SQL development; DBMS_AQ ??

Re: asynchronous PL/SQL development; DBMS_AQ ??

From: Alberto Dell'Era <alberto.dellera_at_gmail.com>
Date: Fri, 27 Apr 2007 21:21:26 +0200
Message-ID: <4ef2fbf50704271221j44e16459h2c877e6a64837352@mail.gmail.com>


If I have understood what you want - I usually use dbms_job for this, in a nutshell

create table remaining (counter int);

insert into remaining (counter) values (2);
dbms_job.submit (  ... proc_1 );
dbms_job.submit (  ... proc_2 );

commit;

each proc will decrement counter upon completion (ok/ko).

Then in the "main thread" (the session that fired the jobs) i simply poll, say every second, table "remaining" until counter is zero.

You can get as sophisticated as you want from here (logging proc errors in the table as well is quite useful for example).

I think that examples of this technique can be found on asktom, I can search there for you if you want.

hth
alberto

On 4/27/07, Cosmin Ioan <cosmini_at_bridge-tech.com> wrote:
> hi all,
> what's the best & most robust package these days, whether Oracle supplied
> (DBMS_AQ?) or third party, to do asynchronous PL/SQL development (9i or
> 10g). I have various scenarios, multiple procedures that I'd like to fire
> at once and upon their validated completion to do some further computations.
>
> thx much,
> Cos
>
>
>

-- 
Alberto Dell'Era
"dulce bellum inexpertis"
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Apr 27 2007 - 14:21:26 CDT

Original text of this message

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