com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using SSL encryption

Viewed 10479

While running DB connection, getting the below error

com.microsoft.sqlserver.jdbc.SQLServerException: 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 [TLS12]". ClientConnectionId:c85e4cb2-09ee-43f0-b7dc-c6b2e73aee8bUser is able to connect SQL Server successfully!!!

2 Answers

Your server is using an old TLS version 1.0 and your db driver is refusing to use it. That's because it's old and you should try to configure your server to use latest TLS 1.2. SO has enough entries on how to do this, e.g. https://dba.stackexchange.com/a/276116

Related