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.
JDBC connect local SQL SERVER 2014 SP3, ERROR with SSL
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
Windows for business Windows Client for IT Pros User experience Other
SQL Server Other
2 answers
Sort by: Most helpful
-
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2023-12-29T22:50:12.25+00:00 -
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
andUp-Vote
for the same. If you have any questions, please feel free to let me know.Best regards,
Aniya