In Microsoft-SQL-Server sp_who2 is a stored-procedure that provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine.
In Microsoft sql-server sp_who2 is a stored-procedure that provides information about current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine. The information can be filtered to return only those processes that are not idle, that belong to a specific user, or that belong to a specific session.
Sp_who2 returns the following informations:
- Spid: System process id that requested the lock
- Status: Background, sleeping or runnable
- Login: The login name that has requested the lock
- HostName: The computer where the lock request has been initiated
- BlkBy: The spid of the connection that is blocking the current connection
- DbName: The database name where the lock request has been generated
- Command: General command type that requested the lock
- CPUTime: The number of milliseconds the request has used
- DiskIO: Disk input / output that the command has used
- LastBatch: Date and time of the last batch executed by the connection
- ProgramName: The name of the application that issued the connection
- Spid: In it is difficult to read the spid from the beginning of the output it is repeated here