MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
create procedure MS_PerfDashboard.usp_Main_GetCPUHistory as begin declare @ts_now bigint select @ts_now = cpu_ticks / convert(float, ms_ticks) from sys.dm_os_sys_info select top 15 record_id, dateadd(ms, -1 * (@ts_now - [timestamp]), GetDate()) as EventTime, SQLProcessUtilization, SystemIdle, 100 - SystemIdle - SQLProcessUtilization as OtherProcessUtilization from ( select record.value('(./Record/@id)', 'int') as record_id, record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)', 'int') as SystemIdle, record.value('(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)', 'int') as SQLProcessUtilization, timestamp from ( select timestamp, convert(xml, record) as record from sys.dm_os_ring_buffers where ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' and record like '%<SystemHealth>%') as x ) as y order by record_id desc end
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Star schema daily updates||2||35|
|Return Rows as per Quantity of Columns Value In SQL||6||27|
|StoredProcedure to JSON query faulty syntax||2||25|
|T-SQL: How to extract records into a new table||7||18|