Posted By

tvanzele on 03/29/10


Tagged

sql DMV


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Buffer pool usage per database


 / Published in: SQL
 

  1. SELECT count(*)*8/1024 AS ‘Cached Size (MB),
  2. Case database_id
  3. When 32767 then ‘ResourceDB’
  4. Else db_name(database_id)
  5. End ASDATABASE
  6. FROM sys.dm_os_buffer_descriptors
  7. GROUP BY db_name(database_id), database_id
  8. ORDER BY ‘Cached Size (MB)DESC;

Report this snippet  

You need to login to post a comment.