Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove an event scheduled with dbms_job? 2

Status
Not open for further replies.

Jami

Programmer
Jul 18, 2000
54
US
I have scheduled an event below that I would now keep from happening. Can anyone tell me how to now stop this event from occuring daily as I had submitted below?

declare
jobnum NUMBER;
BEGIN
dbms_job.submit(jobnum, 'myprocedure;',SYSDATE, 'trunc((sysdate) + 1) + 14/24');
commit;
end;
/

Thanks!
Jami
 
get the job number from dba_jobs and then execute

dbms_job.broken(jobnum,true)

That will retain the job definition but prevent it from executing until you unbreak it with

dbms_job.broken(jobnum,false)
 
If you want to remove the job completely from the job schedule. Using the following call on DBMS_JOB

DBMS_JOB.REMOVE( jobnum );

and it should go from the job queue. To find the
job number use the following queue.

SELECT job, schema_user, what
FROM USER_JOBS

Hope this is of use

LokiDBA

 
Thank you both. Just the direction I needed to gain a better understanding of the dbms_job utility.
Thanks again!
Jami
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top