HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

How does one map the client_version value (from sys.dm_exec_sessions) to TDS Version?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
maptheversionclient_versionvaluetdsonesysdoeshow

Problem

From Microsoft's SQL Server documentation of sys.dm_exec_sessions

client_interface_name
Name of library/driver being used by the client to communicate with the server.
datatype: nvarchar(32)

client_version
TDS protocol version of the interface that is used by the client to connect to the server.
datatype: int


From Microsoft's TDS (Tabular Data Stream) Protocol message and product behavior documentation

TDSVersion
The highest TDS version being used by the client.
The client sends a standard LOGIN7 message to the server to discover the server's highest TDS version.
datatype: binary


Ben Gribaudo posted a partial value map and suggests that client_version is, in fact, not the actual TDS Version.

Questions

(1) What is the client_version value for?

(2) If the client_version definition (above) is correct, then where is the official documented map of integer values to TDS description (either string or binary values)?

Solution

(1) What is the client_version value for?

For administrators it makes sense to go look for older libraries being used, for the server it is imperative to know this so that the correct protocol version can be used.

(2) If the client_version definition (above) is correct, then where is the official documented map of integer values to TDS description (either string or binary values)?

It is correct for everything newer-ish (that's being nice). If you want to be complete it's missing 2 values:

0: TDS 4.2
1: TDS 6.0


There's no official documentation for this AFAIK.

Code Snippets

0: TDS 4.2
1: TDS 6.0

Context

StackExchange Database Administrators Q#308335, answer score: 2

Revisions (0)

No revisions yet.