SELECT object_name, counter_name, cntr_value/1024/1024 AS 'Total Server Memory (KB)'
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)'
SELECT (physical_memory_in_use_kb / 1024) AS CurrentlyUsedMemorybySQLServer
,(locked_page_allocations_kb / 1024) AS Locked_pages_used_Sqlserver_MB
,(total_virtual_address_space_kb / 1024) AS Total_VAS_in_MB
,process_physical_memory_low
,process_virtual_memory_low
FROM sys.dm_os_process_memory;