sqlserver 查看各Job运行时间
发布时间:2020-12-12 14:49:19 所属栏目:MsSql教程 来源:网络整理
导读:select j.name,h.step_id,h.step_name,max(h.run_duration) run_duration from msdb..sysjobs j,msdb..sysjobhistory h where j.job_id = h.job_id and enabled = 1 and step_id 0 and h.run_date = convert(char(8),dateadd(day,-1,getdate()),112) group b
select j.name,h.step_id,h.step_name,max(h.run_duration) run_duration from msdb..sysjobs j,msdb..sysjobhistory h where j.job_id = h.job_id and enabled = 1 and step_id <> 0 and h.run_date >= convert(char(8),dateadd(day,-1,getdate()),112) group by j.name,h.step_name order by run_duration desc
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |