Posted By

tvanzele on 04/02/10


sql DMV

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Get current users and # sessions

 / Published in: SQL

  1. SELECT login_name, COUNT(session_id) AS [session_count]
  2. FROM sys.dm_exec_sessions
  3. GROUP BY login_name
  4. ORDER BY COUNT(session_id) DESC;

Report this snippet  

You need to login to post a comment.