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

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

Suprotim has received the prestigous Microsoft MVP award for nine times in a row now. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that represents premium web sites and digital publications comprising of Professional web, windows, mobile and cloud developers, technical managers, and architects.

3 comments:

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.