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
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. ConnectRunning 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.