Architecting, installing and maintaining your SAS environment

Error in Libname staement

Posts: 1

Error in Libname staement

Hi All,


Was trying to connect to the Redshift database and have installed the necessary drivers that needs to be in place.

Also provided all the connection details in the odbc.ini file.


When I try executing the libname statement in SAS EG I  get the following error.


LIBNAME bluem ODBC DSN='sasredshift' user=it_market_user password=XXXXXX schema=pub_glbl;


ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Can't open lib
'/opt/amazon/redshiftodbc/lib/64/' : file not found
ERROR: Error in the LIBNAME statement.


But the same libname statement runs fine when run from the command line (Linux OS ). I am also able to list the contents of one of the tables in the schema.


NOTE: Libref BLUEM was successfully assigned as follows:
Engine: ODBC
Physical Name: sasredshift



What could I be missng here?

Super User
Posts: 9,910

Re: Error in Libname staement

Posted in reply to Survivindahel



from the commandline and look for redshift-specific environment variables and values, especially in PATH and LIBPATH.

Then set these in the file of your workspace server (most probably SASApp).

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation