You could NEVER, EVER trust Task Manager to tell you how much memory SQL Server is using (maybe you are remembering a 32-bit system with a very small amount of memory). Stop using Task Manager for this, period. Use the performance counter - you can also query the performance counter using DMVs:
SELECT object_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)';
You could save that as a query shortcut in Tools > Options > Environment > Keyboard > Query Shortcuts, and get accurate results in a query window much faster than getting inaccurate results from Task Manager.
You can also check for memory pressure (and whether you can do anything about it) using these queries:
SELECT object_name, counter_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name IN
('Total Server Memory (KB)', 'Target Server Memory (KB)');
-- SQL Server 2012:
SELECT physical_memory_kb FROM sys.dm_os_sys_info;
-- Prior versions:
SELECT physical_memory_in_bytes FROM sys.dm_os_sys_info;
EXEC sp_configure 'max server memory';
EXEC sp_configure 'max server memory';also does not exist in SQL 2008. – AngryHacker Jul 16 '12 at 22:09max server memory (MB)but you don't need to type the whole thing). In order to see it, you need to read into the error message that tells you about it being an advanced option, and thensp_configure 'show adv', 1; reconfigure with override;. Note that you don't have to type all of'show advanced options'here, either. – Aaron Bertrand Jul 16 '12 at 22:14SELECT counter_name, cntr_value ...instead ofobject_name. At least for me on SQL2019 object_name returns "MSSQL$PROD:Memory Manager" for both those counters. – Rory Oct 21 '21 at 11:17