How to resolve "[TCP/IP Sockets]SQL Server does not exist or access denied" error when connecting to TIBCO Statistica database?

How to resolve "[TCP/IP Sockets]SQL Server does not exist or access denied" error when connecting to TIBCO Statistica database?

book

Article ID: KB0077771

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3 and higher

Description

After installing the Statistica client/workstation from the Workstation Installer 64 (or 32) folder, located on the server, we tried to launch Statistica but the following messages appear:

Connection error indicating database connection problem

When walking through the Statistica DSN configuration, under the System DSN tab, we see a similar error:

Control Panel-->Administrative Tools-->ODBC Data Sources (64-bit):

Finding ODBC Data Connection 64 bit

 

Walkthrough of Statistica DSN configuration to test


Causes: One possible cause is a firewall blocking the connection.  The resolution section, below, has only the steps to resolve firewall issue.  Other causes and solutions are here:  https://www.sqlserverlogexplorer.com/database-does-not-exist-access-denied/ 

Issue/Introduction

This article discusses troubleshooting steps to take when a Statistica client/workstation cannot launch because of a database connection issue. When checking the DSN connection, the following error " [TCP/IP Sockets}SQL Server does not exist or access denied" appears. This article only lists the steps when specifically having a firewall issue and provides a link for other root causes and solutions.

Environment

TIBCO Statistica Server. Windows Server 2012 R2 and higher. SQL Server.

Resolution

Typically SQL Server uses TCP port 1443, which may be blocked by a firewall. There may be other ports that need to be opened, depending on how SQL Server is configured.
For more information see  https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-2017

If the correct ports have been opened in the firewall but there is still connection issue, then turn off the firewall or configure the firewall to "allow all traffic" temporarily.Then test the DSN connection again to see if it is successful. If it works, then the firewall is blocking a necessary port/protocol to connect to SQL Server. If the DSN connection fails, the firewall is not the cause of the connection issue.  

If the firewall is the issue, turn the firewall on again and enable logging to determine which port is blocked/dropped. Then open the port in the firewall by making a rule. The following example is with Windows Firewall.

1. Open the Windows Firewall Advanced Settings, click on Properties.  Select the correct tab and select the Customize button under the Logging section

2.  Select "Yes" next to Logged Dropped Packets, then click OK and OK again:

User-added image

3.  Launch the Statistica client (or walk through the System DSN configuration again) to reproduce the error.  

4.  Check the Firewall log file to check which packet has been dropped.  Below, the field for "src-ip" is the workstation/client IP address, which is 10.9.102.192 and the "dst-port" is the port which was blocked, which is 56547:

Firewall log file


5.  Create a rule to open the blocked port (see  https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-firewall/create-an-inbound-port-rule):

Create Inbound firewall rule to unblock port

Now the DSN configuration walk through will proceed and Statistica will work without any issues.

Related knowledge article:
https://support.tibco.com/s/article/How-to-resolve-SQL-Server-error-when-setting-up-System-DSN-ODBC-Connection-for-TIBCO-Statistica-Database

Additional Information

https://www.howtogeek.com/220204/how-to-track-firewall-activity-with-the-windows-firewall-log/
https://support.microsoft.com/en-us/help/4009936/solving-connectivity-errors-to-sql-server
https://www.sqlserverlogexplorer.com/database-does-not-exist-access-denied/