/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT COUNT(*)*8/1024 AS ‘Cached SIZE (MB)’, CASE database_id WHEN 32767 THEN ‘ResourceDB’ ELSE db_name(database_id) END AS ‘DATABASE’ FROM sys.dm_os_buffer_descriptors GROUP BY db_name(database_id), database_id ORDER BY ‘Cached SIZE (MB)’ DESC;