Amount of memory used by a connection/session

  • Hi everyone,

    Have a nice and prosperous 2013 year!!!

    I would like to monitore the amount of memory used by a connection/session.

    I first thought that the column memory_usage (from sys.dm_exec_sessions) would give me the results but I am not sure how to monitore that.

    Can someone shed some ligth on this?

    Best regards,

    Carl

  • sys.dm_exec_sessions is a DMV (Dynamic Management View) so the results will change from one selection to the next based on what sessions are active within the server when you run it. The way to "monitor" the DMV over time is to select from it and compare the results to the last time you selected from it. If you want to react to some threshold, e.g. if a session uses more than 100 pages of memory, then you can react to that from a discrete selection from the DMV.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Thank's a lot for this answer.

    Have a nice day.

    Carl

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply