Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue Installing and Configuring the ODBC Driver for macOS

I can successfully access Snowflake via snowsql, and a browser using the same credentials. However, those credentials do not work with the Driver as laid out in odbc-mac guide. When I test according to "Step 3: Test the ODBC Driver" I get the following eperience:

$ "/Library/Application Support/iODBC/bin/iodbctest"

iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.1521.0607

Enter ODBC connect string (? shows list): dsn=SnowflakeDSII;pwd=[pwd]
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)

1: SQLDriverConnect = [Snowflake][DSI] An error occurred while attempting to retrieve the error message for key 'SFRestRequestFailed' with message parameters ['[host]:443/session/v1/login-request?requestId=[id]&request_guid=[guid]&databaseName=[db_name]&warehouse=[wh]&roleName=[role]', 'CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No  (-1) SQLSTATE=HY000

1: ODBC_Connect = [Snowflake][DSI] An error occurred while attempting to retrieve the error message for key 'SFRestRequestFailed' with message parameters ['[host]:443/session/v1/login-request?requestId=[id]&request_guid=[guid]&databaseName=[db]&warehouse=[wh]&roleName=[role]', 'CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No  (-1) SQLSTATE=HY000

my odbc.ini file is

[ODBC Data Sources]
SnowflakeDSII = Snowflake

[SnowflakeDSII]
Server = [host account].[aws region].snowflakecomputing.com
UID = [user]
Role        = [role]
Database    = [db]
Warehouse   = [warehouse]
Driver = /opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib

Also...

  • I installed the driver: snowflake_odbc_mac_arm64-2.25.0.dmg
  • I had to manually mkdir universal and cp lib/libSnowflake.dylib lib/universal/libSnowflake.dylib
  • (And the error files too)

Thank you for your time!

Update

Also note the system couldn't find the following error files:

  "exceptionMessage": "CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No such file or directory'",
      "request":  "https://[host].us-east-1.snowflakecomputing.com:443/session/v1/login-request?requestId=b5ebf406-989e-4aab-a043-6b4b656961cd&request_guid=8b68691f-db12-44c3-9a91-1fc685cd87a5&databaseName=[db]&warehouse=[wh]&roleName=[role]",
      "sqlState": "HY000"
  • "/opt/snowflake/snowflakeodbc/lib/universal/en-US/SFMessages.xml"
  • "/opt/snowflake/snowflakeodbc/lib/universal/SFMessages_en-US.xml"

So I touched them, but then the error said they were 'empty'

like image 247
DaveWoodall.com Avatar asked Oct 23 '25 03:10

DaveWoodall.com


1 Answers

The issue was that many of the files that the system needs to be in /lib/universal are not there.

The solution is to either sym link, or move them from /opt/snowflake/snowflakeodbc

for example:

# I found
/opt/snowflake/snowflakeodbc/lib/universal/en-US/SFMessages.xml

in

/opt/snowflake/snowflakeodbc/ErrorMessages

Also

/opt/snowflake/snowflakeodbc/lib/cacert.pem 

# needed to be moved to
/opt/snowflake/snowflakeodbc/lib/univeral/cacert.pem 

Thank you, @Sergiu for the logging guidance!

like image 180
DaveWoodall.com Avatar answered Oct 24 '25 16:10

DaveWoodall.com