Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol Version for TDS 8.0 connection #1652

Closed
MasayukiOzawa opened this issue Jun 19, 2022 · 5 comments · Fixed by #1657
Closed

Protocol Version for TDS 8.0 connection #1652

MasayukiOzawa opened this issue Jun 19, 2022 · 5 comments · Fixed by #1657

Comments

@MasayukiOzawa
Copy link

MasayukiOzawa commented Jun 19, 2022

Connect to SQL Server 2022 CTP 2.0 with TDS 8.0 with Encrypt=Strict and get the Protocol Version with the following query.

select 
ec.connect_time,es.last_request_start_time ,es.session_id, 
(CAST(protocol_version AS BINARY(4))),
es.program_name, es.client_version, ec.protocol_type,ec.protocol_version,
es.client_interface_name,ec.encrypt_option
from sys.dm_exec_sessions as es
inner join sys.dm_exec_connections as ec
	on ec.session_id = es.session_id
order by connect_time desc

When I connect with Encrypt=Strict, I expect a TDS 8.0 connection, but the query results in a TDS 7.4 connection.
image

Even if Encrypt=Strict is specified, the Protocol Version obtained from SQL Server is TDS 7.4, does this mean that you are not able to connect with TDS 8.0?
Or is it a problem with the display of the Protocol Version of SQL Server 2022 CTP 2.0?

environment

  • SQL Server: 2022 CTP 2.0 (16.0.600.9)
  • SQL Client Version: Microsoft.Data.SqlClient 5.0.0-preview3 22168.1
@JRahnama
Copy link
Contributor

@MasayukiOzawa this could be a SQLServer 2022 issue for not showing the actual version number, but let me do more testing and I will get back to you soon.

@David-Engel
Copy link
Contributor

There are two sides to this. TDS 8.0 now negotiates the TDS version as part of the ALPN TLS extension. There is also the legacy place for the client to register the TDS version in the LOGIN7 packet, which now happens after the TLS negotiation. The client is still sending 7.4 in the legacy location but that doesn't determine the TDS dialect anymore in TDS 8+. However, the server (SQL 2022 CTP 2.0) is still reporting the TDS version from the legacy value. From what I understand, the server will be fixed in a future release, but the client should also send the correct version in the legacy field for now.

@MasayukiOzawa
Copy link
Author

Thanks for the information.
Should I present this question as feedback for SQL Server 2022?

@David-Engel
Copy link
Contributor

Should I present this question as feedback for SQL Server 2022?

No need. The server team is already aware of the issue and plans to address it before RTM.

@MasayukiOzawa
Copy link
Author

It appears that the server team is already aware of this issue, so we will close it.
Thanks to all who commented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants