Skip to content

Instantly share code, notes, and snippets.

@Otterpohl
Created May 13, 2022 14:09
Show Gist options
  • Save Otterpohl/0d0659c98d045af43d3130aff1049430 to your computer and use it in GitHub Desktop.
Save Otterpohl/0d0659c98d045af43d3130aff1049430 to your computer and use it in GitHub Desktop.
Gets a high level summary of memory usage
SELECT total_physical_memory_kb / 1024 AS [Physical Memory (MB)],
available_physical_memory_kb / 1024 AS [Available Memory (MB)],
total_page_file_kb / 1024 AS [Total Page File (MB)],
available_page_file_kb / 1024 AS [Available Page File (MB)],
system_cache_kb / 1024 AS [System Cache (MB)],
system_memory_state_desc AS [System Memory State]
FROM sys.dm_os_sys_memory;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment