Connect to MS SQL Server 2005 using Win 11 and MSOLEDBSQL19 [closed]

fdx2calv  于 12个月前  发布在  SQL Server
关注(0)|答案(1)|浏览(168)

Closed. This question needs details or clarity . It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post .

Closed last month.
Improve this question

Ive been having some trouble establishing a connection to an old MS SQL Server 2005 (which is used for some internal tooling) from Windows 11 using ADO and MSOLEDBSQL19.

Connecting to the server from Win 10 using the same driver works fine. Connecting from Win 11 does not.

I have read that this old SQL Server version uses TLS 1.0 or 1.1, both of which are disabled on Windows 11 by default. I have reactivated them using IISCrypto but still no luck. I can however connect to the Server via the SQL Management Studio. Using the SQL Native Client driver and even MSOLEDBSQL version 18 also works fine.

Therefore, the issue must be MSOLEDBSQL19 (or my usage of it) but I couldn't find much info about which changes between driver versions caused this. In my connection string I think I should have anything disabled that would cause issues. I played with it for a while but couldnt get a cs that worked. Here are two of the ones I tried.

Provider=MSOLEDBSQL19;Data Source=<host>;Initial Catalog=<db>;Trusted_Connection=Yes;
TrustServerCertificate=Yes;Encrypt=Optional;Use Encryption for Data=Optional
Provider=MSOLEDBSQL19;Data Source=<host>;Initial Catalog=<db>;Encrypt=No;Use Encryption for Data=No

The error this gives me is just a generic error message saying that the connection was closed by the remote.

I know that these requirements are quite silly (MSOLEDBSQL19 + SQL Server 2005) but I hope this isnt impossible as it worked on Windows 10. Theres probably something very obvious im missing here so Id be very grateful for some advice.

kx1ctssn

kx1ctssn1#

If the "2003" typo means you're also running Windows Server 2003, you have a problem. SQL Server's encryption support also depends on the underlying OS, and Windows Server 2003 forces you back all the way to TLS 1.0, which is so broken now you may just as well turn encryption off completely. Also remember when you enable the older protocols you have to reboot your computer before the change takes effect.

相关问题