Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unable to locate SQLGetPrivateProfileString function" with Snowflake ODBC on Ubuntu 22

I have installed the Snowflake ODBC driver on Ubuntu 20 (Focal) successfully before, and it works fine. After installing the same packages on a new Ubuntu 22 (Jammy) system, the Snowflake ODBC driver refuses to connect, with this error:

$ isql -v snowflake-dev <redacted> <redacted>
[S1000][unixODBC][Snowflake][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.
[ISQL]ERROR: Could not SQLConnect

The same command works fine on Ubuntu 20.

Here are the relevant bits of my config files (which of course are the same on the two systems):

/etc/odbc.ini:

[snowflake-dev]
Description=SnowflakeDB
Driver=SnowflakeDSIIDriver
Locale=en-US
SERVER=<redacted>.east-us-2.azure.snowflakecomputing.com
PORT=443
SSL=on
ACCOUNT=<redacted>

/etc/odbcinst.ini:

[SnowflakeDSIIDriver]
APILevel=1
ConnectFunctions=YYY
Description=Snowflake DSII
Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so
DriverODBCVer=03.52
SQLLevel=1
UsageCount=1

and the driver file does exist in that directory:

$ ls -l /usr/lib/snowflake/odbc/lib/libSnowflake.so*
-rwxr-xr-x 1 root root 177405464 Aug  1 15:14 /usr/lib/snowflake/odbc/lib/libSnowflake.so
$ file /usr/lib/snowflake/odbc/lib/libSnowflake.so*
/usr/lib/snowflake/odbc/lib/libSnowflake.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=61282db74b8db4d446540d7f53458245a6ef6997, with debug_info, not stripped

Am I missing something essential? Is there something new required on Ubuntu 22 that wasn't before?

like image 456
RGoodman Avatar asked Oct 25 '25 10:10

RGoodman


1 Answers

I found that the file /usr/lib/x86_64-linux-gnu/libodbcinst.so.1 did not exist on my system. I changed the file <snowflake path>/lib/simba.snowflake.ini to point to /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 instead, and now it works.

like image 96
RGoodman Avatar answered Oct 28 '25 04:10

RGoodman