Answers for "dbms_scheduler stop job"

SQL
2

dbms_scheduler drop_job

BEGIN
  dbms_scheduler.drop_job(job_name => 'MY_JOB');
END;
Posted by: Guest on February-03-2021
1

dbms_scheduler stop job

-- To simply stop job without killing session:
BEGIN
    DBMS_SCHEDULER.STOP_JOB(JOB_NAME => 'scheme.job_name', FORCE => TRUE);
END;
-- Killing job's session: first get Job session IDs
SELECT jr.JOB, s.USERNAME, s.SID, s.SERIAL#, p.SPID, s.LOCKWAIT, s.LOGON_TIME
FROM DBA_JOBS_RUNNING jr, V$SESSION s, V$PROCESS p
WHERE jr.SID = s.SID AND s.PADDR = p.ADDR
ORDER BY jr.JOB;
-- Kill session with IDs and wait for rollback if any...
ALTER SYSTEM KILL SESSION 'SID,SERIAL#' IMMEDIATE;
Posted by: Guest on April-21-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language