How to capture SQL Server PerfMon Counters without running Performance Monitor

The performance monitor is a great tool to monitor the performance of your network. You can use PerfMon to view SQL Server objects and performance counters as well as the behavior of other objects. However if you want to know an alternative method to capture SQL Server PerfMon Counters without running the Performance Monitor Tool, then use a SQL Server Operating System Related Dynamic Management View called sys.dm_os_performance_counters

SELECT * FROM sys.dm_os_performance_counters
image

I would still prefer the GUI, but knowing an alternate way of capturing PerfMon Counters does not hurt!

3 comments:

  1. One thing you need to be cautious about when using this DMV is that many of these counters are incremental from the last time the SQL Server was started. Themselves, the numbers may not mean anything. It's only when you establish a baseline and analyze "further" activity, that this wonderful DMV shows it's true worth.

    BTW, in SQL Server 2000, one can query "master.dbo.sysperfinfo" to obtain the same information.

    ReplyDelete
  2. Great for knowing what components are actually doing. For example is your disk mainly reading or writing.
    -Tom

    ReplyDelete