Hello,
This DMV "SYS.DM_OS_MEMORY_OBJECTS" gives memory usage by different Types in SQL server. Now on my SQL server i have 62 GB of RAM and SQL Server is set to use 55GB. In Task Manager i see that SQL server is using around 52 GB of RAM but this DMV gives me that SQL is using 6 GB of RAM. Why there is the difference?
i am using following query to get memory usage:-
SELECT SUM(pages_allocated_count * CAST(page_size_in_bytes AS FLOAT)) as 'Bytes Used' FROM SYS.DM_OS_MEMORY_OBJECTS