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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_JOB - Need Help

Re: DBMS_JOB - Need Help

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 15 Apr 1998 18:25:41 GMT
Message-ID: <3534fad6.19213988@192.86.155.100>


A copy of this was sent to jcurry_at_dankoi.com (Jim Curry) (if that email address didn't require changing) On Wed, 15 Apr 1998 14:15:28 GMT, you wrote:

>The last couple of days I have been trying to use the DBMS_JOB package
>to schedule a job to run. I have tried several variations of the
>commands but the only way I can get a job to actually execute is by
>using DBMS_JOB.RUN. Everything looks like it is filled in correctly
>in the DBA_JOBS table but the time the job is supposed to start always
>comes and goes without the job running.
>
>Is there some process in Oracle that needs to be "started" in order
>for things put in the DBA_JOBS table to be able run? It would seem
>that there must be some process that would periodically look in the
>table to see if there is work to do. I am wondering if that process
>is not running on our machine.
>

Yes, there are 2 important init.ora settings you need to have:

NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
job_queue_interval                  integer 10

job_queue_processes                 integer 1                      

job_queue_interval determines the number of seconds between 'peeks' into the queye the job queue process will sleep for. In my setting, every 10 seconds the queue will be 'looked' at.

job_queue_processes sets the number of concurrent jobs that can be executing in the background. Mine is set to 1. If I have 2 jobs set to run at the same exact instant, only one will run and when it completes the next will.

>Below is the script I have been trying to use to schedule a job. I
>would expect it to cause the procedure JJC_TEST to run in 5 minutes
>and then every 5 minutes thereafter. What it does for me is update
>the DBA_JOBS table with the pertinent information and nothing else. I
>appreciate any help that can be given.
>
>Declare
> job_number INTEGER;
>Begin
> dbms_job.submit(job_number, 'JJC_TEST;', sysdate + 5/1440, 'sysdate
>+ 5/1440');
> COMMIT;
>END;
>/
>
>
>Jim
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Apr 15 1998 - 13:25:41 CDT

Original text of this message

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