sp_who– useful – up to a point. Particularly when the server is busy, and you’re looking for something specific (eg to see if certain processes are out of a database before running an update)
If the server is busy – don’t you wish there was a way to run something like
dbname = 'foo'
Yeah. Unfortunately, it doesn’t work like that.
That doesn’t work, but Thomas shows you what does.