Thought I´d inform about a nice little procedure I found today.

I failed to remove a database since there were still users connected. Obviously, I was the one keeping a connection but that doesn’t mean I know where I´m keeping that open connection 🙂

Just run this little nicety:

EXEC sp_who

And you´ll have a neat list of all users, state and databases currently connected.