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: how to notify when dbms_job completes?

Re: how to notify when dbms_job completes?

From: <rgaffuri_at_cox.net>
Date: Tue, 13 May 2003 12:26:48 -0800
Message-ID: <F001.00597FB3.20030513122648@fatcity.com>


oh i think I figured it out.

I register a listener with dbms_alert for every dbms_job I run. I then have my jobs alert the listener when complete.

my main thread will have a counter for every job inside a loop.

for i=0;i<wait_count;i++
  sleep.
  wake when alerted.

finish loop when all alerts come in
do analyze

yes I know that isnt pl/sql syntax. I Think that will work.
>
> From: <rgaffuri_at_cox.net>
> Date: 2003/05/13 Tue PM 12:11:56 EDT
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Subject: how to notify when dbms_job completes?
>
> I want to create indices in parallel so I want to use dbms_job. then when that is complete I want to analyze the table.
>
> I thought about using dbms_lock and a pl/sql table, but this is inefficient and wastes CPUs because there is no 'lock monitor' like the wait,notify,synchronize in java and POSIX pthreads, so I have to keep looping and checking the pl/sql table.
>
> any better way?
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: <rgaffuri_at_cox.net
> INET: rgaffuri_at_cox.net
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: <rgaffuri_at_cox.net
  INET: rgaffuri_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue May 13 2003 - 15:26:48 CDT

Original text of this message

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