JDBC connect local SQL SERVER 2014 SP3, ERROR with SSL

lin sun 0 Reputation points
2023-12-29T07:47:14.6866667+00:00

env:

WIN10, 22H2, SQL SERVER 2014 SP3, Java 1.7.45, SQL Server management Studio 19

when trying to connect my local SQL SERVER 2014 EXPRESS using user sa, get the result of "The driver could not establish a secure connection to SQL Server by using the Secure Sockets Layer (SSL) encryption"

connection string is

"jdbc:sqlserver://SE-5CD2318SWJ\TEC41;DatabaseName=xiaosh00;Encrypt=false"

the SQL management studio can connect to SQL SERVER and open database normally

User's image

User's image

Windows for business Windows Client for IT Pros User experience Other
SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-12-29T22:50:12.25+00:00

    Sounds like a TLS issue to me. Like your SQL Server instance only wants TLS 1.2, but your Java driver tries to speak TLS 1.0.

    0 comments No comments

  2. Anonymous
    2024-01-02T01:58:27.7766667+00:00

    Hi @lin sun

    Regarding the error of "The driver could not establish a secure connection to SQL Server by using the Secure Sockets Layer (SSL) encryption", I have found this article for you: https://techcommunity.microsoft.com/t5/sql-server-blog/the-driver-could-not-establish-a-secure-connection-to-sql-server/ba-p/383477, maybe you can be used as a reference.

    If the answer is helpful, please click Accept Answer and Up-Vote for the same. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.