How to know memory(RAM) usage by all the process(SPID)?

Answered How to know memory(RAM) usage by all the process(SPID)?

  • Friday, August 03, 2012 6:22 PM
     
     

    How to know memory(RAM) usage by all the process(SPID)?

    SQL Server is using huge amount memory. I would like to know - Inside the sql server which SPID is using which amount of memory.

    is there any query to list all the SPIDs with the amount of memory they are using?

All Replies

  • Friday, August 03, 2012 10:49 PM
     
     Answered

    Hi,

    SQL Server tries to cache everything to memory. Due to that fact it tries to use lot of memory. Memory object are database objects in the buffer pool, execution plans, etc. You can use these two DMV's to check the memory>

    • sys.dm_os_buffer_descriptors
    • sys.dm_os_memory_clerks

    Also sys.dm_exec_sessions has a memory_usage column which you may be interested. It contains the number of 8KB pages of memory used by the session

    I hope it helps.

    Janos


    There are 10 type of people. Those who understand binary and those who do not.

    My Blog | Hire Me