Sql-server – SQL server DB status runnable, sleeping, suspended, running and background meanings

sql server

I am not able to get the meanings of DB Session status. I searched it for some references, but not getting any help.
Can anyone explain these status (runnable, sleeping, suspended, running and background) what actually means, that would be help me a lot.
Thanks in advance.

Best Answer

The status values are documented with sp_who:

The possible values are:

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 the process.

Pending - The session is waiting for a worker thread to become available.

Runnable - The session's task is in the runnable queue of a scheduler while waiting to get a time quantum.

Spinloop - The session's task is waiting for a spinlock to become free.

Suspended - The session is waiting for an event, such as I/O, to complete.