← Scheduler & Jobs
Oracle · Scheduler & Jobs
How to stop a running scheduler job in Oracle
Stop a running scheduler job with DBMS_SCHEDULER.STOP_JOB, with notes on the force option and the privilege it needs.
Tested on11g12c18c19c21c23ai26ai
Stop a Scheduler job that is currently running.
This interrupts a running job. force => TRUE terminates it by killing the underlying session and needs the MANAGE SCHEDULER privilege; try force => FALSE first.
BEGIN
DBMS_SCHEDULER.STOP_JOB(
job_name => '&&job_name',
force => FALSE);
END;
/
-- Verify (read-only): no rows once stopped
SELECT owner, job_name, session_id, elapsed_time
FROM dba_scheduler_running_jobs
WHERE job_name = UPPER('&job_name');DBMS_SCHEDULERSTOP_JOBScheduler