1DECLARE
2 existing_program NUMBER;
3BEGIN
4 SELECT count(*) INTO existing_program
5 FROM ALL_SCHEDULER_PROGRAMS WHERE PROGRAM_NAME = 'prog_name' AND OWNER='owner';
6 IF existing_program = 1 THEN
7 dbms_scheduler.DROP_PROGRAM(PROGRAM_NAME => 'prog_name');
8 END IF;
9END;
10/
11BEGIN DBMS_SCHEDULER.create_program(program_name => 'owner.prog_name', ...); END;