Skip to content

Instantly share code, notes, and snippets.

@gaborgsomogyi
Last active March 2, 2020 09:54
Show Gist options
  • Save gaborgsomogyi/942df7dd7d18cd5029d85eb73c5b1cc0 to your computer and use it in GitHub Desktop.
Save gaborgsomogyi/942df7dd7d18cd5029d85eb73c5b1cc0 to your computer and use it in GitHub Desktop.

To read what kind of authentication scheme is used:

sqlcmd -S example.com -U sa -P Mssql123 -Q "SELECT auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@spid"
  • SQL: When SQL Server authentication is used
  • NTLM: When NTLM authentication is used
  • KERBEROS: When KERBEROS authentication is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment