January 04, 2010

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!


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

 
  Feedback:

comments

3 Responses to "How to capture SQL Server PerfMon Counters without running Performance Monitor"
  1. Troy said...
    February 17, 2010 at 7:25 AM

    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.

  2. Suprotim Agarwal said...
    February 17, 2010 at 11:19 AM

    Troy: Thanks for your useful comment!

  3. Tom said...
    January 6, 2011 at 8:58 AM

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

 

Copyright © 2009-2014 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions