What is SP_WHO and SP_WHO2?
Everyone who works on SQL Server may have used the system stored procedure sp_who. But very few knows about sp_who2. Because sp_who2 is not documented in msdn. Both SP_WHO and SP_WHO2 are Microsoft system stored procedures used to find the current and active session details. SP_WHO2 is similar to SP_WHO with some more details.
SP_WHO returns the below details:
Execution context ID
Session ID of the blocking process
Sample SP_WHO Execution:
SP_WHO2 will also return all the details like SP_WHO, in addition, it will return the below specified additional details. SP_WHO2 will be very helpful when you want to see the current blocking sessions along with the CPU utilization and the disc I/O usage.
Sample SP_WHO2 Execution: