Reputation: 23
The message given is;
Cannot establish a connection to jdbc:sqlserver://HARSHS-PC\SQLEXPRESS;databaseName=mydb1 using com.microsoft.sqlserver.jdbc.SQLServerDriver (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]". ClientConnectionId:d7ef2454-53af-4f3c-995e-00c75b4d3f39)
How can I establish the connection?
What can be the possible solutions?
Upvotes: 0
Views: 1788
Reputation: 573
Your SQL server only offers TLS1.0 which is most likely disabled in your jre for security reasons.
I'd suggest that you upgrade your SQL Server to the most recent TLS version which is as of today TLS1.3 or at least to TLS1.2.
Another possibility (I would not recommend) would be to modify your java.security
which is part of your java jre distribution. To reenable TLS1.0.
Upvotes: 1