1、背景

下面是从以往Profiler收集的跟踪文件中提取Job有关数据

;with cte as(
select b.Name EventClass,TextData,DatabaseName,Duration/1000 Duration_ms
,CPU CPU_ms,Reads,Writes,StartTime,EndTime,HostName,LoginName,ApplicationName
,row_number() over(partition by ApplicationName order by CPU desc) rankid 
from fn_trace_gettable(N'F:\TroubleShooting\Trace\InstanceName_HighCPU40_20160907.trc', 1) a
inner join sys.trace_events b
on a.EventClass=b.trace_event_id
where ApplicationName like '%SQLAgent - TSQL JobStep%'
)
select * from cte where rankid=1
order by CPU_ms desc
View Code

相关文章:

  • 2021-10-24
  • 2022-12-23
  • 2021-06-09
  • 2022-01-18
  • 2021-12-15
  • 2022-03-01
猜你喜欢
  • 2022-02-09
  • 2021-12-11
  • 2022-12-23
  • 2021-11-13
  • 2021-08-11
  • 2021-12-14
  • 2021-06-20
相关资源
相似解决方案