SQL Server process memory with sys.dm_os_process_memory
Query sys.dm_os_process_memory to follow the memory used, reserved and committed by the SQL Server process.
The sys.dm_os_process_memory view shows the memory used by the SQL Server process itself. The query below converts the KB counters to MB.
SELECT
physical_memory_in_use_kb/1024 AS sql_physical_memory_in_use_MB,
large_page_allocations_kb/1024 AS sql_large_page_allocations_MB,
locked_page_allocations_kb/1024 AS sql_locked_page_allocations_MB,
virtual_address_space_reserved_kb/1024 AS sql_VAS_reserved_MB,
virtual_address_space_committed_kb/1024 AS sql_VAS_committed_MB,
virtual_address_space_available_kb/1024 AS sql_VAS_available_MB,
page_fault_count AS sql_page_fault_count,
memory_utilization_percentage AS sql_memory_utilization_percentage,
process_physical_memory_low AS sql_process_physical_memory_low,
process_virtual_memory_low AS sql_process_virtual_memory_low
FROM sys.dm_os_process_memory;
Columns
| Column | Meaning |
|---|---|
| sql_physical_memory_in_use_MB | Physical memory currently used by the SQL Server process |
| sql_large_page_allocations_MB | Memory allocated with large pages |
| sql_locked_page_allocations_MB | Memory allocated as locked pages |
| sql_VAS_reserved_MB | Virtual address space reserved by the process |
| sql_VAS_committed_MB | Virtual address space committed by the process |
| sql_VAS_available_MB | Virtual address space still available |
| sql_page_fault_count | Number of page faults of the process |
| sql_memory_utilization_percentage | Percentage of the process memory in use |
| sql_process_physical_memory_low | 1 when the process reports low physical memory |
| sql_process_virtual_memory_low | 1 when the process reports low virtual memory |