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: Ranko Mosic <ranko.mosic_at_gmail.com>
Date: Thu, 21 Apr 2005 10:58:12 -0400
Message-ID: <367369f1050421075861d60ec3@mail.gmail.com>


Job processes are doing nothing else.=20 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.=20 rm.

On 4/21/05, Knight, Jon <jknight_at_concordefs.com> wrote:
> From my observations, it takes some time for the Oracle dbms_job processe=
s
> to kick off your job if they're busy with something else. That's probabl=
y
> where your delay is coming from. One workaround would be a job that runs
> continually in a loop and executes the 3 procedures ASAP. I don't know t=
hat
> it's advisable to let a job run forever, so you could have the loop
> terminate itself every 5 minutes or so to give the database a chance to
> "breath".

>=20

> Thanks,
> Jon Knight
>=20

> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.o=
rg]
> On Behalf Of Ranko Mosic
> Sent: Thursday, April 21, 2005 8:25 AM
> To: oracle-l_at_freelists.org
> Subject: Lazy dbms_job
>=20

> I am running following procedure ( Oracle 9i ):=3D20
>=20

> dbms_job.submit( l_job, 'background_submit_proc( JOB, NEXT_DATE);' );
>=20

> create or replace
> procedure background_submit_proc( p_job in number, p_NEXT_DATE OUT DAT=
E=3D
> )
> as
> begin
> uui(); -- these are procedures that are executed;
> uui1();=3D20
> uui2();
>=20

> =3D09p_next_date :=3D3D sysdate + 1/24/60/60*1;
>=20

> exception when others then raise;
> end;
> /
>=20

> 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 incremented
> almost every second.
> It is not. It is incremented every 15 seconds.=3D20
> Is there a way to make it more responsive ? I want it to execute every se=
co=3D
> nd .=3D20
>=20

> Regards, Ranko.
> --
> http://www.freelists.org/webpage/oracle-l
> --
> http://www.freelists.org/webpage/oracle-l
>
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 21 2005 - 11:02:23 CDT

Original text of this message

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