SQL Server Performance

spid in sleeping mode

Discussion in 'General DBA Questions' started by Joben, Mar 21, 2011.

  1. Joben New Member

    Hi Everybody,Why does a query get into sleeping status? Does it take any resource?Is there any way that we can find which query is in sleep status? Please let me know.Thank you
  2. satya Moderator

    One of the BOL documentation refers that : A session with that status of sleeping / awaiting command is simply a client connection with no active query to the SQL Server. The table below shows the transitions from running to sleeping states for a session.
    Connect CompletedSleeping / Awaiting Command
    select @@VERSIONRunning
    select completedSleeping / Awaiting Command
    The sleeping connections you get to see on SQL instance are nothing but waiting to execute the next set of instructions. In terms of memory yes they occupy which is specified if you run SP_WHO2.

Share This Page