Linux环境下无法通过Simba ODBC驱动从SAS连接Google BigQuery
Got it, this error pops up because the $(INSTALLDIR) placeholder in your driver's error message path isn't being resolved to the actual installation directory of the Simba BigQuery ODBC driver. Let's walk through the fixes step by step:
Step 1: Set the INSTALLDIR Environment Variable
First, you need to define the correct path where your Simba driver is installed. Looking at your error path, the driver root directory is /shared/SAS/simba/googlebigqueryodbc/ (the lib/64/ part is a subdirectory of this root).
- Temporary fix (for the current shell session):
export INSTALLDIR=/shared/SAS/simba/googlebigqueryodbc/ - Permanent fix (persists across sessions):
Add the export command to your user's shell profile or the system-wide profile. For example:
If SAS runs as a service account or another user, make sure to set this variable in that user's profile or the system's# Add to your user's .bashrc echo "export INSTALLDIR=/shared/SAS/simba/googlebigqueryodbc/" >> ~/.bashrc # Load changes immediately source ~/.bashrc/etc/profilefile.
Step 2: Update ODBC Configuration Files
Check your odbcinst.ini and odbc.ini files (usually in /etc/ or ~/.odbc.ini) to ensure driver paths are correctly set without unresolved variables.
Example odbcinst.ini entry for Simba BigQuery:
[Simba BigQuery ODBC Driver] Driver=/shared/SAS/simba/googlebigqueryodbc/lib/64/libgooglebigqueryodbc_sb64.so Setup=/shared/SAS/simba/googlebigqueryodbc/lib/64/libgooglebigqueryodbc_sb64.so ErrorMessagesPath=/shared/SAS/simba/googlebigqueryodbc/ErrorMessages/en-US
Make sure ErrorMessagesPath points directly to the folder containing ODBCMessages.xml—no $(INSTALLDIR) placeholders here.
Step 3: Verify File Permissions & Existence
- Confirm the error message file exists:
ls /shared/SAS/simba/googlebigqueryodbc/ErrorMessages/en-US/ODBCMessages.xml - Ensure the user running SAS (or testing with
isql) has read permissions for this file and its parent directories:chmod -R 644 /shared/SAS/simba/googlebigqueryodbc/ErrorMessages/
Step 4: Test the Connection Again
Use the isql command to test your ODBC connection (replace YOUR_DSN_NAME with your actual DSN):
isql -v YOUR_DSN_NAME
If this works, try connecting from SAS again—this should resolve the error.
内容的提问来源于stack exchange,提问作者Mahebunnisa Shaik

