sp_who2 Alternative (T-SQL, SQL Server)

ben himself's picture

The trusty "sp_who2" is a quick way to look at what's happening on your SQL instance, but you can't put a WHERE clause on that thing! You have to manually sift through the results and there could be hundreds of results.

Never fear.

This quick script gives you the same basic output that sp_who2 gives, except you can throw a filter on the results with the WHERE clause.