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)
)