Skip to content
August 3, 2011 / doganay

ALL SCHEDULER JOBS REMOVE

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
 
Hi,
You may create a procedure like this to remove all sched. jobs:

create or replace
procedure sys.sched_jobs_remove is
begin
 for i in (select job,log_user from dba_jobs)
 loop
   begin
     sys.dbms_ijob.remove(i.job);
     commit;
   exception
    when others then
         null;
   end;
 end loop;
 for j in (select 'BEGIN DBMS_SCHEDULER.DISABLE('''||owner||'.'||job_name||''',true,''ABSORB_ERRORS''); END;' command1
           from DBA_SCHEDULER_JOBS where owner not in ('SYS','ORACLE_OCM')
          )
 loop
   begin
       execute immediate j.command1;
     commit;
   exception
    when others then
         null;
   end;
 end loop;
 commit;
end;
/

--!! and execute it to remove all sched. jobs:
execute  sys.sched_jobs_remove;
commit;

try and pray :)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: