Created
March 4, 2020 10:56
-
-
Save raandree/103c4c6eeaf42eaa62223a9a88c6378a to your computer and use it in GitHub Desktop.
Gets all connection from a SQL server including authentication type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
s.session_id, | |
c.connect_time, | |
s.login_time, | |
s.login_name, | |
c.protocol_type, | |
c.auth_scheme, | |
s.HOST_NAME, | |
s.program_name | |
FROM sys.dm_exec_sessions s | |
JOIN sys.dm_exec_connections c | |
ON s.session_id = c.session_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment