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: Lazy dbms_job

RE: Lazy dbms_job

From: Justin Mitchell <jmitchell_at_taxwise.com>
Date: Thu, 21 Apr 2005 11:02:34 -0400
Message-ID: <59426D03782DBD42AED3E85C3DAFED833C9946@exch01.utsad.com>


If you want to spare some resources, why not put in a DBMS_LOCK.SLEEP call to give the database a breather?

Justin Mitchell

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ranko Mosic Sent: Thursday, April 21, 2005 10:58 AM
To: jknight_at_concordefs.com
Cc: oracle-l_at_freelists.org
Subject: Re: Lazy dbms_job

Job processes are doing nothing else.=3D20 Yes, we thought about an infinite loop; trying to find less resource intensive solution. If it terminates/restarts that there would be a gap again. It must be responsive - this is application background processing.=3D20 rm.

On 4/21/05, Knight, Jon <jknight_at_concordefs.com> wrote:
> From my observations, it takes some time for the Oracle dbms_job=20
> processe=3D

s
> to kick off your job if they're busy with something else. That's=20
> probabl=3D

y
> where your delay is coming from. One workaround would be a job that=20
> runs continually in a loop and executes the 3 procedures ASAP. I=20
> don't know t=3D

hat
> it's advisable to let a job run forever, so you could have the loop =20
>terminate itself every 5 minutes or so to give the database a chance to

>"breath". =3D20
> Thanks,
> Jon Knight
>=3D20
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org

[mailto:oracle-l-bounce_at_freelists.o=3D
rg]
> On Behalf Of Ranko Mosic
> Sent: Thursday, April 21, 2005 8:25 AM
> To: oracle-l_at_freelists.org
> Subject: Lazy dbms_job
>=3D20
> I am running following procedure ( Oracle 9i ):=3D3D20
>=3D20
> dbms_job.submit( l_job, 'background_submit_proc( JOB, NEXT_DATE);' );=20
>=3D20 create or replace
> procedure background_submit_proc( p_job in number, p_NEXT_DATE OUT
DAT=3D
E=3D3D
> )
> as
> begin
> uui(); -- these are procedures that are executed;
> uui1();=3D3D20
> uui2();
>=3D20
> =3D3D09p_next_date :=3D3D3D sysdate + 1/24/60/60*1;
>=3D20
> exception when others then raise;
> end;
> /
>=3D20
> Whole thing runs fine. It modifies NEXT_DATE so it reschedules itself

>as soon as 3 procedures are finished. Procedures are very fast ( takes

>less than a second to execute them ). So job's NEXT_DATE should be=20
>incremented almost every second.
> It is not. It is incremented every 15 seconds.=3D3D20
> Is there a way to make it more responsive ? I want it to execute every
se=3D
co=3D3D
> nd .=3D3D20
>=3D20
> Regards, Ranko.
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l


The information contained in this electronic message from Universal Tax Systems, Inc., and any attachments, contains information that may be confidential and/or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this information is strictly prohibited. If you have received this communication in error, please notify Universal Tax Systems, Inc., immediately by e-mail or by telephone at 706/290-7200, and destroy this communication. Thank you.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 21 2005 - 11:07:54 CDT

Original text of this message

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