RE: Lazy dbms_job

  • From: "Justin Mitchell" <jmitchell@xxxxxxxxxxx>
  • To: <ranko.mosic@xxxxxxxxx>, <jknight@xxxxxxxxxxxxxx>
  • Date: Thu, 21 Apr 2005 11:02:34 -0400

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Ranko Mosic
Sent: Thursday, April 21, 2005 10:58 AM
To: jknight@xxxxxxxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxx=3D
rg]
> On Behalf Of Ranko Mosic
> Sent:   Thursday, April 21, 2005 8:25 AM
> To:     oracle-l@xxxxxxxxxxxxx
> 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.
> --
> //www.freelists.org/webpage/oracle-l
> --
> //www.freelists.org/webpage/oracle-l
>
--
//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.

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

Other related posts: