KNOWLEDGE BASE

Unable to connect SQL database after upgrading the SQL ODBC driver on Linux


Published: 18 Jul 2023
Last Modified Date: 15 Aug 2023

Issue

After updating the SQL ODBC Driver on Linux Machine, unable to connect the Data source with the error:

"Could not connect to the server "

The installation is successful but unable to connect to the Data source.

Environment

  • Tableau Server
  • Linux (Ubuntu)
  • MS SQL Server

Resolution

  • Verify the permission of the SO file and make sure the user has full permission.
  • Check the dependency packages of the SO file and verify with the below command if there is any dependency package is missing. (ldd command checks the dependency and report any missing objects.)
    • ldd /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1 (File name will be changed based on the version)
If there are missing files, reinstall the ODBC driver package.

Cause

The dependency packages were missing for the ODBC driver.

Additional Information

You will see the following error in vizportal logs when you try to test the connection to the data source if there are missing files.

"msg":"\"There was an unknown connection error to the database. The error message below has additional information, but you might need to ask the database administrator to review the database logs.\n[unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1' : file not found\n\"","type":"ConnectivityException"},
 
Did this article resolve the issue?