• Oracle_91 (9/30/2013)


    Hi sql-lover,

    Thanks for the query. However, this script would show only the buffer distribution. ITs doesn't include the memory allocations done outside buffer pool(i.e. memToleave or non-buffer or memory allocations > 8k) .

    Correct.

    The T-SQL query I gave you is for finding how much memory databases are using from SQL server buffer pool, I think. But that's usually close enough to give you an idea of how much your server is using. It's by far, the largest consumer of RAM on SQL server.

    If you want something more specific, I'm afraid you will have to use SQL perfom monitor counters for that.

    Here's another way to get that, via DMV

    SELECT object_name, counter_name, cntr_value AS 'Total Server Memory (KB)'

    FROM sys.dm_os_performance_counters

    WHERE counter_name = 'Total Server Memory (KB)'