Hi , I am getting below error while connecting to a SQL server database via ODBC connection.
I have verified that database access & firewall accesses are present.
Any help would be greatly appreciated !
Error SQLDriverConnect: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECDoClientHandshake()).[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
When I changed the driver to Native Client 11.0 I got a different error message.
Error SQLDriverConnect: [Microsoft][SQL Server Native Client 11.0]TCP Provider: An existing connection was forcibly closed by the remote host. [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection
Hi @HarishKhanna1 ,
The SSL error is probably related to the encryption of the connection. I suggest downloading the ODBC driver 17 or 18 and adjusting this part below.
Best,
Fernando V.
This error usually comes up because of a TLS/SSL handshake mismatch. Newer Windows/SQL builds disable TLS 1.0/1.1, and if your ODBC driver is old it can’t talk TLS 1.2, so the connection fails.
A few things to try:
Install the latest Microsoft ODBC Driver for SQL Server (don’t use the old “SQL Server” driver).
Make sure TLS 1.2 is enabled on both client and server.
Check that SQL Server has a valid certificate and the client trusts it.