Listen Software's How To: Job Management

Monday Mar 18th 2002 by David Nishimoto
Share:

Examples of how to use the snapshot process to create stored procedures that run as jobs, how to run an existing job, how to remove a job from the job queue, and how to review job status.

Create a Job

VARIABLE v_jobnum NUMBER;

BEGIN
   dbms_job.submit(:v_jobnum,
     'my_stored_procedure;', 
     sysdate,'sysdate+1');
END;

Run an Existing Job

dbms_job.run(job_number);

Remove a Job from the Job Queue

dbms_job.remove(job_number);

Review Job Status

select
job,
log_user,
priv_user,
schema_user,
next_date,
next_sec,
interval,
failures,
total_time,
what
from dba_jobs;

select * from user_jobs;

select * from dba_jobs_running;
Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved