We have an issue in one of our production databases which I cannot find a solution for. One of our Jobs is stuck in the RUNNING
state and attempting to stop it produces a ORA-27366: job "NameSpace"."Some_Job" is not running
. Querying the DBA_SCHEDULER_JOBS
table have the job listed as RUNNING
, but what's odd is that The Next_Run_Date
is greater than the Last_Start_Date
by about 10 minutes.
Attempting to stop the job by using:
-- Stop Job
BEGIN
DBMS_SCHEDULER.STOP_JOB(job_name => 'NameSpace.SomeJob', force => TRUE);
DBMS_OUTPUT.PUT_LINE('Stopped Job - SUCCESS');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Stopping of Job FAILED - ' || SQLERRM);
Gave me the following:
Stopping of Job - FAILED - ORA-27366: job "NameSpace"."SomeJob" is not running
My question is, how do I really stop the job?