select instance_id,jh.run_date,jh.job_id,jh.step_name, case jh.run_status then 'failed' then 'Succeeded' then 'Retry' then 'Canceled' end as run_status ,) as '开始时间' ,) ) as '秒',jh.run_duration,jh.run_time from msdb.dbo.sysjobhistory jh with(nolock) w…