Author Archives: SandeepSingh DBA

About SandeepSingh DBA

Hi, I am working in IT industry with having more than 10 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.

The driver could not establish a secure connection to SQL Server using Secure Sockets Layer (SSL) encryption.

While using the application connection, we are getting the error:

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.

We checked the connection setting and on the net, we found to add the following in the connection setting to fix the issue:

Try either and check the error : encrypt=true; OR trustServerCertificate=true; 

Before:
jdbc:sqlserver://servername:portnumber;DatabaseName=dbName;

After changes my error is fixed:
jdbc:sqlserver://servername:portnumber;DatabaseName=dbName;encrypt=true;
OR
jdbc:sqlserver://servername:portnumber;DatabaseName=dbName;encrypt=true;trustServerCertificate=true;