Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

oracle drop job if exists

DECLARE
    l_job_exists NUMBER;
BEGIN
    SELECT count(*) INTO l_job_exists FROM ALL_SCHEDULER_JOBS
    WHERE JOB_NAME = 'job_name' AND OWNER = 'owner_name';
    IF l_job_exists = 1 THEN
        dbms_scheduler.drop_job(job_name => 'owner_name.Job_name');
    END IF;
END;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #oracle #drop #job #exists
ADD COMMENT
Topic
Name
8+6 =