Kendra Little explains what the sp_who2 procedure does and how to read its results:
Let’s talk about sp_who2
I started out using sp_who2, also! And I was often confused by sp_who2.
sp_who2 is a built-in stored procedure in SQL Server.
- Shows a lot of sessions, even on an idle instance
- Doesn’t tell you much about what it’s doing
Here’s what an idle SQL Server looks like in sp_who2
This is my dev SQL Server instance. I have a few sessions open, but the only one which was executing anything was the one you see, where I ran sp_who2. I don’t have any agent jobs scheduled on this thing. It’s just waiting for something to happen.
It’s hard to know what to look at, because we see so much. And only 19 of the 49 sessions is on the screen, too.
Kendra then goes on to explain that there are better ways of getting this information and plugs sp_whoisactive. I’m 100% in agreement.