Wikipedia

Search results

Enable/Disable job

############# Enable/Disable job #############

View Running db jobs:
===================
SELECT owner,
             job_name,
           running_instance,
           elapsed_time
     FROM   dba_scheduler_running_jobs
    ORDER BY owner, job_name;

You could actually enable/disable the job yourself since it belongs to D5768PGM by signing on to P5768RPT as D5768PGM and running  :

--to enable a dbms job  - the job number ---

BEGIN dbms_job.broken(227,FALSE,'');END;
commit;

Exec SYS.DBMS_IJOB.BROKEN(jobid,FALSE,'');( need Execute Any procedure privs)

--to disable a dbms job   where job number is 227 (from your listing)--

BEGIN dbms_job.broken(227,TRUE,'');END;
commit;


Exec SYS.DBMS_IJOB.BROKEN(jobid,TRUE,'');( need Execute Any procedure privs)


=======view ALL running jobs-========

SELECT a.sid, c.serial#, a.job, a.failures, to_char(a.this_date, 'mm/dd/yyyy hh:mi pm') startdatetime, b.what
FROM dba_jobs_running a, dba_jobs b, v$session c
WHERE a.job = b.job AND a.sid = c.sid order by a.this_date;

No comments:

Post a Comment