What is the difference between sp_who vs sp_who2 in SQL Server Instance?

When deciding whether to use sp_who or sp_who2, check the table below for a detailed comparison list.

The main difference between the two commands is this:

sp_who is documented and officially supported.
sp_who2 is undocumented and therefore unsupported but commonly used.

As you can see on the comparison table below, they both basically return the same information but sp_who2 includes some extra columns:

sp_whosp_who2
spidSystem process idSPIDSystem process id
ecidExecution context of the thread associated with the SPID. Zero means the main thread, all other numbers mean sub-threads. 
statusRunnable, sleeping, or background. If the status is runnable that means the process is actually performing work, sleeping means the process is connected to the server, but is idle at the moment.StatusRunnable, sleeping, or background. If the status is runnable that means the process is actually performing work, sleeping means the process is connected to the server, but is idle at the moment.
loginameThe login name of a userLoginThe login name of the user
hostnameComputer name of the user.HostNameComputer name of the user.
blkThe SPID of the connection that is blocking the current connectionBlkByThe SPID of the connection that is blocking the current connection
dbnameThe database name where process is runningDBNameThe database name where process is running
cmdGeneral command type currently being executedCommandGeneral command type currently being executed
 CPUTimeThe number of milliseconds the request has used
 DiskIODisk input / output that the command has used
 LastBatchDate and time of the last batch executed by the connection
 ProgramNameThe name of the application that connected with
 SPIDSame SPID repeated at the end of the file for right-scrolling users

Microsoft Docs web site for sp_who:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-who-transact-sql

Link to my newly blog on: How to filter sp_who2 in SQL Server Instance

Scroll to top