JDBC connection failed after upgrade stating "The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption"


Description

After upgrading the Instance and MID Server, loading records from the JDBC Datasource failed with the below error:

"MID Server reported error: java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:e431e5d4-2acb-48c3-8b5b-c52bfca4bb11"

 

Cause

1. Find out the Java version used by the MID Server.

2. Find out the SQL Server version of the target where the JDBC Datasource queries.

 

Java version 1.8+ uses TLS 1.2 by default

TLS 1.2 is supported only from SQL 2008 and higher versions which cause the SSL exception.

Reference - https://support.microsoft.com/en-in/help/3135244/tls-1-2-support-for-microsoft-sql-server

Resolution

Request the SQL admins to create a new view/instance/node on a different server which is of version 2008 or higher so that the TLS version Supports.