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!


About The Author

Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of DotNetCurry, DNC Magazine for Developers, SQLServerCurry and DevCurry. He has also authored a couple of books 51 Recipes using jQuery with ASP.NET Controls and a new one recently at The Absolutely Awesome jQuery CookBook.

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.

Get in touch with him on Twitter @suprotimagarwal, LinkedIn or befriend him on Facebook

3 comments:

Troy said...

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.

Suprotim Agarwal said...

Troy: Thanks for your useful comment!

Anonymous said...

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