How to get rid of jobs / dbms_job (old style) that you don't own

Do you have some legacy DBMS_JOBS hanging out there running – that somebody left – and abandoned to “rust”.  Need to get rid of them even though you don’t own them?  Try this as long as you can connect as sysdba:

–select * from dba_jobs;
set heading off
set feedback off
select ‘execute sys.dbms_ijob.remove(‘||trim(to_char(job))||’);’ from dba_jobs
WHERE LOG_USER like ‘%username%’ or LOG_USER like ‘%username2%’;
–select * from dba_jobs;

Now just execute the output as sysdba.

Leave a Comment

Scroll to Top