Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of session states in SQL Server, such as sleeping, suspended, running etc

Tags:

sql-server

I'm confused about the session states of SQL Server sessions. Can anyone explain it?

like image 575
Just a learner Avatar asked Oct 12 '10 06:10

Just a learner


1 Answers

From MSDN:

  • dormant = SQL Server is resetting the session.
  • running = The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches. For more information, see Using Multiple Active Result Sets (MARS).
  • background = The session is running a background task, such as deadlock detection.
  • rollback = The session has a transaction rollback in process.
  • pending = The session is waiting for a worker thread to become available.
  • runnable = The task in the session is in the runnable queue of a scheduler while waiting to get a time quantum.
  • spinloop = The task in the session is waiting for a spinlock to become free.
  • suspended = The session is waiting for an event, such as I/O, to complete.
like image 158
Andomar Avatar answered Nov 01 '22 08:11

Andomar