Wednesday, 11 March 2015

sp_who & sp_who2

There is a very useful system stored procedure called sp_who on SQL Server that lists the users and processes running on the system. It comes handy when you want to know the loading on the SQL Server or see if any process is blocked.It will give result as running spids, who login to the system with host name and what he is running on that machine.
sp_who
 

sp_who2 

It will give the more information that CPU time, disk io with last batch time and that login where (ie., on which database) he is executing the query.

No comments:

Post a Comment