| How to
list job execution history? |
|
Execute the following
script in Query Editor to get a list of job execution history
by jobs and steps:
use AdventureWorks;
select JobName = name,
StepName=Step_name,
RunDate = run_date,
DurationInMinutes=(run_duration/100)+1
from msdb.dbo.sysjobhistory jh
join msdb.dbo.sysjobs j
on jh.job_id = j.job_id
order by run_date,jh.job_id, step_id
|
| The Best SQL Server
2005 Training in the World |
|