Buffer pool usage per database


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  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 AS ‘DATABASE’
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.