Saturday, August 16, 2008

dbms_jobs

# check the status of jobs
select broken, failures from dba_jobs;

# execute a job
execute dbms_job.run (1);

# set jobs to broken so they don't run again
select 'execute dbms_job.broken('||job||',TRUE,'''||sysdate||''');' from dba_jobs where log_user = 'APPS' and broken = 'N';