Verify the TLS Version Used by a SQL Server Connection

SQL Server’s connection DMV can confirm that a session is encrypted, but it does not report the negotiated TLS version. Use the DMV for the supported encryption check, then inspect the handshake of the actual client connection when you must distinguish TLS 1.3 from TLS 1.2.

Last updated: November 23, 2026.

SELECT
    c.session_id,
    c.encrypt_option,
    c.protocol_version,
    c.net_transport,
    s.program_name,
    s.client_interface_name
FROM sys.dm_exec_connections AS c
JOIN sys.dm_exec_sessions AS s
  ON s.session_id = c.session_id
WHERE c.session_id = @@SPID;

A value of TRUE in encrypt_option confirms encryption for this session. Do not interpret protocol_version as a TLS version: Microsoft defines it as the version of the data-access protocol associated with the connection.

Verify TLS 1.3 at the handshake

Microsoft documents TLS 1.3 support beginning with SQL Server 2022 and TDS 8.0; SQL Server 2019 and earlier do not support it. The server, operating system and client driver must all support the protocol, and strict encryption is the TDS 8.0 connection mode.

For a definitive result, capture the client’s real connection and inspect the negotiated handshake. Microsoft’s TLS 1.3 configuration guide shows that Wireshark may display TLS 1.2 in compatibility fields even when the supported_versions extension confirms TLS 1.3. The same guide demonstrates OpenSSL against the SQL Server port, but that tests the OpenSSL connection, not necessarily your application driver.

Avoid undocumented monitoring dependencies

Events such as sni_trace or newly discovered debug-channel fields may be useful during investigation, but they are not a stable monitoring contract unless Microsoft documents them for the installed release. Do not decode a TDS value into a TLS version without an authoritative mapping.

Use sys.dm_exec_connections for continuous checks that encryption is enabled. Use a short, approved packet capture when the exact negotiated protocol matters, filtering by the client and server addresses and reproducing one fresh login. Also verify certificate validation: an encrypted connection that blindly trusts an unexpected certificate does not provide the same identity assurance as strict encryption with a valid trusted certificate.

Related Web Cheat Sheet guides

Sergey Kornilov

Sergey Kornilov