How do I use sys.dm_exec_connections in combination with SUSER_SNAME()?
I want to see the username corresponding to each record in sys.dm_exec_connections.
|
How do I use I want to see the username corresponding to each record in sys.dm_exec_connections. |
|||
|
|
|
As others have already pointed out the info you want is in
|
|||||||
|
|
If you execute Or you could just do:
This will give you all sessions, and if you just want user sessions then you could go with this:
This will give you the SPID, host name, login name, status, etc. |
|||||||
|
|
|||
|
|