How to Get a Graph of Request Traffic History in MS SQL Server 2008 R2

sql serversql-server-2008-r2

We're having difficulty with an application. One of the potential causes on the table is a regular spike in database traffic overloading the database, causing DB-dependent services to back up.

I would like to get a graph of the number of requests received per second over the last several days, and can't figure out how to get Server Management Studio to give me one. Or any historical performance graph, for that matter. Plenty of performance reports but none of them showing differences over time. Is this something it can't do, or am I just not looking in the right place?

Best Answer

The engine stores the data in the DMVs for example, this query shows the batch requests per second. However, it stores just a cumulative number. You'd have to poll and record the values in another table and then go back and run your own queries to get the results (or the graph).

SELECT  
    * 
FROM    
    sys.dm_os_performance_counters 
WHERE 
    RTRIM(counter_name) LIKE 'Batch Requests/sec'

Microsoft has a feature that will store this type of information in a data warehouse for you. The feature is called MDW - Management Data Warehouse. You can find it with an easy internet search or try this MS link: MDW