Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Buffer cache hit ration ( for week ) Expand / Collapse
Author
Message
Posted Thursday, March 28, 2013 3:39 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 25, 2013 1:48 PM
Points: 25, Visits: 74

Hi everybody , I need your help please :
I want to create a graph to show the progression of the "buffer cache hit ratio" for last 7 days (a week).
Until now I use this script (actual moment ) :

SELECT CAST( 
(
SELECT CAST (cntr_value AS BIGINT)
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Buffer cache hit ratio'
)* 100.00
/
(
SELECT CAST (cntr_value AS BIGINT)
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Buffer cache hit ratio base'
) AS NUMERIC(6,3)
)

Post #1436335
Posted Thursday, March 28, 2013 4:38 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 10:07 AM
Points: 14,034, Visits: 28,406
Just turn that same query into an INSERT ... SELECT... statement and save the data into a table along with the date and time that you collected the information. Then you can generate a report. There's no way just from the DMO you're querying to see what's happening over the week. You have to store that information in some manner.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1436374
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse