What SQL Server ODBC driver should be used when TLS version 1.2 is enabled?

What SQL Server ODBC driver should be used when TLS version 1.2 is enabled?

book

Article ID: KB0075424

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.5 and above

Description

When trying to logon to Statistica Enterprise in an environment where TSL 1.2 is enabled,  an error is prompted with message "SSL Security errorConnection Open (SECDoClientHandshake). (ODBC RETCODE: -1; State: 08001, Native: 18, Origin:[Microsoft][ODBC SQL Server Driver] [DBNETLIB]State: 01000, Native: 772, Origin: [Microsoft][ODBC SQL Server Driver][DBNETLIB]) (CSSSPC.cpp(1725)]". 

User-added image

This logon error indicates failing to connect to the SQL database, which is the database setup for Statistica Enterprise installation in this case.

Following the test steps at below to evaluate if it is truly a database connection error or not:
----------------------
1. Open Notepad.
2. Save the file as 'Connectivity Test.udl' and file type as 'All Files'.
3. Open the saved file.
4. Select Microsoft OLE DB Provider for SQL Server as the provider.
5. Provide server connection and authentication details (e.g. the Enterprise database information in this case).
6. Test the connection.
-----------------------

If the connection test fails, it confirms a SQL database connection issue. In particular, if the error message indicates "Microsoft Data Link Error [DBNETLIB [Connection Open (SECDoClientHandshake0).JSSL Security error" with a screenshot at below:

User-added image

It indicates the issue is related to the version of TLS that is enabled (check reference articles at the bottom). If  TLS 1.2 is enabled, it is likely due to that Microsoft ODBC Driver 17 for SQL Server is not installed to support the SQL database connection.

Issue/Introduction

This article details the cause and resolution for the Enterprise logon error "SSL Security errorConnection Open (SECDoClientHandshake).(ODBC RETCODE: -1; State: 08001, Native: 18, Origin: [Microsoft][ODBC SQL Server Driver] [DBNETLIB]State: 01000,Native: 772, Origin: [Microsoft][ODBC SQL Server Driver][DBNETLIB]) (CSSSPC.cpp(1725)]".

Resolution

1. Install the compatible version ODBC diver--"Microsoft ODBC Driver 17 for SQL Server" and its prerequisite components (download link https://www.microsoft.com/en-us/download/details.aspx?id=56567).

2. Under ODBC Administrator|System DSN, check the driver version for the the existing Enterprise database DSN (named "SEWSS" by default). If the old driver (e.g. ODBC Driver 13 for SQL server) is in use, delete the current DSN.
Note: Before deleting, please keep a record of the DSN information such as name and description, since the information is needed in later steps.
Note: A similar issue on Azure PaaS use case is discussed in this KB https://support.tibco.com/s/article/Use-latest-SQL-Server-ODBC-driver-on-Azure-PaaS-Platform-as-a-service-for-Statistica-Server-DSN


3. Click "Add" button to create a new DSN and select "ODBC Driver 17 for SQL Server" as the driver.

User-added image

4. Fill in the same information as the deleted DSN (name and description), and select the same SQL server database:

User-added image

5.  Follow the instruction to finish the DSN setup steps.
When launching Statistica, selecting the correct database in the drop down, if necessary:

User-added image

Additional Information

Note: If you are using 2008R2 SQLServer Database, you may need to apply a patch to make TLS work: https://support.microsoft.com/en-us/help/3135244/tls-1-2-support-for-microsoft-sql-server


https://www.sqlnethub.com/blog/dbnetlib-connectionopen-secdoclienthandshake-ssl-security-error-resolve/

https://www.sqlnethub.com/blog/quick-tip-sql-server-support-tls-1-2

https://www.microsoft.com/en-us/download/details.aspx?id=56567

https://support.tibco.com/s/article/Use-latest-SQL-Server-ODBC-driver-on-Azure-PaaS-Platform-as-a-service-for-Statistica-Server-DSN