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:

Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from

Leave a Reply

Be the First to Comment!

Notify of