use msdb
select a.name as JobName ,run_date as Date,server,
case run_status
when 0 then 'Failed'
when 1 then 'Success' end as "Result" from sysjobhistory b, sysjobs a
where step_id=0 and a.job_id=b.job_id
and run_date > CONVERT(VARCHAR , GETDATE(), 112)-25 and run_date <= CONVERT(VARCHAR , GETDATE(), 112)
order by date desc;
No comments:
Post a Comment