BookmarkSubscribeRSS Feed
RussL
Calcite | Level 5

Hi group,

 

Our team has set up the sas-analytics-pro docker container, release stable-2025.05.  This will be replacing SAS 9.4 on the Windows desktops.  Our current solution involves defining a user ODBC DSN in Windows and then running LIBNAME at the top of SAS programs (or at start-up) to define a library reference to the SQL Server where our main data mart resides.  We are experiencing difficulties in getting the equivalent approach to work in Viya..

 

Within SAS Studio I have run proc setinit noalias; and confirm that ---SAS/ACCESS Interface to Microsoft SQL Server is installed. 

Using curl I confirmed network connectivity from the container to the SQL Server.   

We see in /opt/sas/viya/home/lib64/accessclients/odbcinst.ini that SAS ACCESS to MS SQL Server is installed, or at the least, the referenced library file exists.

All of our attempts to connect using various methods in documentation or found in Internet forums have failed, usually with a variation of a libname error, example:

83         libname sqlsrv odbc
84           noprompt=
85             "Driver=SAS ACCESS to MS SQL Server;
86              Host=xxxxxx;
87              Port=1433;
88              Database=yyyyyy;
89              Uid=uuu;
90              Pwd=ppp;"
91           schema=dbo;
ERROR: CLI error trying to establish connection: 523 630
ERROR: Error in the LIBNAME statement.

Or in the case of a custom odbc.ini, with environment variables set appropriately

(ODBCINI=/data/odbc.ini
ODBCSYSINI=/opt/sas/viya/home/lib64/accessclients/odbcinst.ini)

the result is :

83         libname mydblib odbc dsn="MSSQL_DSN" user="XXX" password=XXXXXXXXXXXXXXX schema=dbo;
ERROR: CLI error trying to establish connection: [DataDirect][ODBC lib] Driver Manager Message file not found. Please check for the 
       value of InstallDir in your odbc.ini.
ERROR: Error in the LIBNAME statement.

In the custom ini we have the usual source info parameters plus

InstallDir=/opt/sas/viya/home/lib64/accessclients

Driver=/opt/sas/viya/home/lib64/accessclients/lib/S0sqls28.so

 

Any ideas why none of these approaches are working, or pointers to references which could help us move forward?

 

Many thanks!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Discussion stats
  • 0 replies
  • 1061 views
  • 0 likes
  • 1 in conversation