SELECT type,--clerk type sum (virtual_memory_reserved_kb) as vm_reserved_kb,--reserved Memory sum (VIRTUAL_MEMORY_COMMITTED_KB) as VM_COMMITTED_KB,--committed memory sum (awe_allocated_kb) as awe_allocated_kb,--the memory sum (shared_memory_reserved_kb) as SM used when opening awe _RESERVED_KB,--shared reserved memory sum (shared_memory_committed_kb) as sm_committed_kb,--shared commit memory sum (single_pages_kb) as SINLGEPAGE_KB,--Buffer pool stolen Memory sum (multi_pages_kb) as multipage_kb--MemToLeave memory from Sys.dm_os_memory_
Clerks GROUP by type Order Bytype-query buffer pool/memory to Leave SELECT sum (virtual_memory_reserved_kb) as [reserved], SUM (virtual_memory_committed_kb) as [Commit], sum (virtual_memory_reserved_kb)/sum (virtual_memory_committed_kb) AS[ Reserved/commit], sum (single_pages_kb) +sum (multi_pages_kb) as [stolen], sum (virtual_memory_committed_kb) +sum ( single_pages_kb) as [Buffer Pool], sum (multi_pages_kb) as[memtoleave], sum (awe_allocated_kb) as [aweallocated] from sys. Dm_os_memory_clerks--Querying SQL Server memory using the SELECT * from SYS.DM_OS_PROcess_memory