Sp_who

Retiring sp_who and sp_who2

 

Sp_who and sp_who2 have been some very popular T-SQL commands. What if I told you that you could get more and better information from DMVs that have been around since SQL Server 2005?

With the advent of SQL Server 2005 came along new objects called Dynamic Management Views, also known as DMVs. One of the great places where improvements were made by adding the DMVs is when investigating what is happening on a SQL Server at the moment production troubleshooting is required. When things go south and the DBA is contacted, the new DMV’s are invaluable. Despite this, there are still some folks out there using sp_who and sp_who2. With this post I want to demonstrate why you should stop using sp_who and sp_who2. Retire these commands and move on to something better.

Continue reading