Use latest SQL Server ODBC driver on Azure PaaS (Platform as a service) for Statistica Server DSN

Use latest SQL Server ODBC driver on Azure PaaS (Platform as a service) for Statistica Server DSN

book

Article ID: KB0077129

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.5

Description

After installing Statistica 13.5 on Azure using Windows Server 2016, login failed and following errors occurred:

User-added image
Text:  "The database is already opened"

User-added image

Text:  System error or access violation (ODBC RETCODE: -1; State: 37000, Native 0, Origin: [Microsoft][ODBC Cursor Library])[CssSPC.cpp(917)]



 

Issue/Introduction

This article details how to resolve "The database is already open" error followed by "System error or access violation (ODBC RETCODE: -1; State: 37000, Native 0, Origin: [Microsoft][ODBC Cursor Library])[CssSPC.cpp(917)]" while using standard Windows ODBC SQL driver to connect Statistiica to its meta database which is Azure PaaS (Platform as a Service) SQL Server.

Environment

Azure PaaS and Windows Server 2016 (may affect other OS versions).

Resolution

Use the most recent/latest SQL Server ODBC driver and not the legacy driver that ships with Windows and will not work for Azure SQL:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/a69e9c18-c408-418c-b336-6d28e3985f31/odbc-connection-to-azure-sql-dababase?forum=ssdsgetstarted

Below is the relevant information:

It seems you are using the "SQL Server" ODBC driver that ships with Windows. That driver is intended to be used only for legacy SQL Server applications and is provided for backwards compatibility.

For Azure SQL Database, download and install a newer SQL Server ODBC driver, such as ODBC Driver 17 for SQL Server (https://www.microsoft.com/en-us/download/details.aspx?id=56567). Select that driver when creating your DSN.


After installing the new driver:
1.  Delete the current DSN (may want to check database connection information before deleting)
2.  Click the System DSN tab at the top and then click "Add" button to create a new DSN.  
3.  Select the newly installed driver:
New DSN with latest ODBC driver

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

5.  Complete the DSN setup.

When launching Statistica, selecting the correct database in the drop down, if necessary:

Database DSN dropdrown

 

Additional Information

Here is info on diagnosing general connection issues to Azure SQL database:
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-troubleshoot-common-connection-issues