Monday, August 16, 2010

SQL Server 2008 sys.dm_os_ring_buffers timestamp column

I have used the below code in SQL Server 2008 to reveal the sys.dm_os_ring_buffers timestamp column in a friendly format. 

SELECT Dateadd(ms,-1 * ((si.cpu_ticks / si.ms_ticks) - rb.TIMESTAMP),
Getdate()) AS time_stamp,
FROM sys.dm_os_ring_buffers rb,
sys.dm_os_sys_info si
ORDER BY time_stamp DESC

No comments:

Post a Comment