MacOS ODBC connection issue - (11560) Unable to locate SQLGetPrivateProfileString function

Hi all,

I am running Dremio on an Ubuntu server and am trying to configure ODBC connection from MacOS High Sierra in order to display data in OpenOffice/Excel.

When I connect external ODBC database from OpenOffice, I am encountering the following issue :

Statut SQL: HY000
Code d’erreur: 11560
[Dremio][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.

I find a similar issue on Ubuntu : Ubuntu ODBC connection issue - Connection::SQLConnectW: [Dremio][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function

So is it the same workaround to resolve the issue on MacOS ?

Thanks
Julien

Here is content of /Library/Dremio/ODBC/lib/dremio.drillodbc.ini file

[Driver]
DisableAsync=0
ErrorMessagesPath=/Library/Dremio/ODBC/ErrorMessages
LogLevel=0
LogPath=/tmp
SwapFilePath=/tmp

Here is content of /Library/ODBC/odbc.ini file

[ODBC Data Sources]
Local Dremio Connector = Dremio Connector

[Local Dremio Connector]
Description = Local Dremio Connector
Driver = /Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib
ConnectionType = Direct
HOST = x.x.x.x
PORT = 9047
ZKQuorum = [Zookeeper Quorum]
ZKClusterID = [Cluster ID]
AuthenticationType = Plain
UID = jumo38
PWD = [PASSWORD]
AdvancedProperties = CastAnyToVarchar=true
HandshakeTimeout = 5
QueryTimeout = 180
TimestampTZDisplayTimezone = utc
NumberOfPrefetchBuffers = 5
Catalog = DREMIO
SSL = 0
DisableHostVerification = 0
DisableCertificateVerification = 0
TrustedCerts = /Library/Dremio/ODBC/lib/cacerts.pem
UseSystemTrustStore = 0
UseExactTLSProtocolVersion = 0

Hi @jumo,

This issue occurs because the driver is not able to locate the iODBC Driver Manager’s SQLGetPrivateProfileString function. This function is used by the driver to lookup what DSNs are installed.

Would you be able to find libiodbcinst.dylib on your system, then edit the dremio.drillodbc.ini file and add the “ODBCInstLib” variable under [Driver], to point to the library?

Hi @jumo

It looks like a similar incompatibility as the post you mentioned. While we are working on a fix, you can try to add the following line to the file /Library/Dremio/ODBC/lib/dremio.drillodbc.ini as a workaround:

ODBCInstLib=/usr/lib/libiodbcinst.dylib

Hi jduong, laurent,

Yep, similar issue and similar workaround :wink:
It works like a charm now !

Thk you very much