Hello Adam,
I've just stumbled across this site and I hope you're still at it.
Even though I've been in the IT since the beginning of IT time (yes, I started with computers before the PC...1980), I'm new to SQL.
I was looking for a better method than just SP_WHO2, and it looks like you got it! Good job!
I'm on SQL studio with SQL 2008 R2. When I load you script, I get a lot of red.
I figure if there's anybody yet that can point me in the right direction, it would be you.
thanks so much for all your efforts!
smifflin@aeronavdata.com