Script to find Running Process and Session in SQL Server

In this post I provide you a different script to find out running sessions and processes in SQL Server.
As a DBA, this is very much important to find all current running sessions and processes of SQL Server.
Below is different three ways to find all running process of SQL Server.

First, Using SP_WHO & SP_WHO2:
This both command is used to check and monitor current running connections and sessions of SQL Server.

SP_WHO : provides information like: Session ID, Logged User ID, Host Name, Session Status, Blocked Process, Database Name, Command Details, Request ID.
SP_WHO2 : provides some additional information like : CPU Time by each session, no of Disk Reads, Last query execution time

Second, Using sysprocesses View:


Third, Using dm_exec_requests:

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of