Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

need to create a report showing buffer cache used by database?

$
0
0

I am trying to  create a report showing buffer cache used by each database on a server. I looked at creating a new metric but none of the categories made sense to me. Do I need to make a separate metric for each database on the server? This would be a pain to maintain as databases come and go.

Here is the basic query.

select db_name(database_id) as 'Database Name',

convert(numeric(8,2),count(page_id)/128.0) as Mb

from sys.dm_os_buffer_descriptors with (nolock)

where database_id !=32767

group by database_id

order by count(page_id) desc;


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>