September 25, 2013 at 8:53 am
Hi Guys,
Can someone please point me in the correct direction, been searching in vain for a number of days.
I'm monitoring sql agent jobs with a mixture of SCOM & notifier alerts with a job, however
encountering problems where a few jobs complete successfully.
However within the steps there have been errors, I've queried various agent history
table alas no errors are reported.
How can I extract information within a successful scheduled job?
Cheers
September 25, 2013 at 8:59 am
This query will give you failed job steps. Just change the date to go back as far as you need.
select sj.name, sjh.* from msdb.dbo.sysjobhistory sjh
join msdb.dbo.sysjobs sj on sj.job_id = sjh.job_id
where sjh.run_date > 20130924
and sjh.run_status = 0
order by sjh.job_id, sjh.run_date, sjh.run_time
September 26, 2013 at 1:15 am
Thank you very much.....
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply