Skip to content

Instantly share code, notes, and snippets.

@jacobhackl
Created January 30, 2011 22:34
Show Gist options
  • Save jacobhackl/803346 to your computer and use it in GitHub Desktop.
Save jacobhackl/803346 to your computer and use it in GitHub Desktop.
Quick sql server check for memory
exec sp_configure
SELECT
( CASE WHEN ( [is_modified] = 1 ) THEN 'Dirty' ELSE 'Clean' END ) AS 'Page State' ,
( CASE WHEN ( [database_id] = 32767 ) THEN 'Resource Database' ELSE DB_NAME ( database_id ) END ) AS 'Database Name' ,
COUNT (*) AS 'Page Count'
FROM sys . dm_os_buffer_descriptors
GROUP BY [database_id] , [is_modified]
ORDER BY [database_id] , [is_modified] ;
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment