Shawn_Moore

TIP: ** Bonus Tip** Query: What Jobs/Reports Ran Over the Last n Days?

Discussion created by Shawn_Moore Employee on Jan 11, 2011
Latest reply on Aug 23, 2012 by Shawn_Moore
CA Clarity Tuesday Tip by Shawn Moore, Sr. Principal Support Engineer for 1/4/2011

Bonus Tip for Today:

These are simple and could be expanded, but they provide a simple yet powerful listing of what job or reports have run and the range of time they ran.

MS SQL Server

select name, runs.START_DATE, runs.END_DATE, runs.job_hostname, defs.executable
from cmn_sch_job_runs runs, cmn_sch_jobs jobs, cmn_sch_job_definitions defs
where runs.job_id = jobs.id and
jobs.JOB_DEFINITION_ID = defs.id and
runs.start_date > getdate() - 3


Oracle

select name, runs.START_DATE, runs.END_DATE, runs.job_hostname, defs.executable
from cmn_sch_job_runs runs, cmn_sch_jobs jobs, cmn_sch_job_definitions defs
where runs.job_id = jobs.id and
jobs.JOB_DEFINITION_ID = defs.id and
runs.start_date > sysdate - 3

-shawn

Outcomes