Architecting, installing and maintaining your SAS environment

unable to connect to db using ODBC

Reply
Contributor
Posts: 60

unable to connect to db using ODBC

Hi, We have installed sas viya 3.2 and Our database is Denodo. We need to connect to denodo to access the data using ODBC(3rd party driver). We have also installed denodo ODBC drivers on to the sas server. While we try to connect to the db, using the below script from sas studio

 

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

libname odbclib odbc noprompt = "server = denodoIP; DRIVER = DenodoODBCDriver; userid = sas_odbc_user;
 password = xxxxxxxxxx; database = dbname";

 

Its throwing an error as below.

 

ERROR: The ODBC engine cannot be found.
ERROR: Error in the LIBNAME statement.
 
Could anyone let us know what is causing this error. Also is there any way to check if the ODBC configuration is proper or not. Thanks!!
 

 

SAS Employee
Posts: 413

Re: unable to connect to db using ODBC

@AmitSri,

 

Launch the CAS Server Monitor, http://<FQDN>:8777/cas-shared-default-http/tkcas.dsp, and go to "RunTime Environment". What are the current values for  ODBCINI & LD_LIBRARY_PATH?

Contributor
Posts: 60

Re: unable to connect to db using ODBC

Hi Alex,

I have checked it. And the values are as follows:

ODBCINI /etc/odbc.ini
ODBCINSTINI /etc/odbcinst.ini
SAS Employee
Posts: 413

Re: unable to connect to db using ODBC

@AmitSri,

 

What about LD_LIBRARY_PATH?

Contributor
Posts: 60

Re: unable to connect to db using ODBC

And here is the LD_LIBRARY path in the attachment. Thanks!!

SAS Employee
Posts: 413

Re: unable to connect to db using ODBC

@AmitSri,

 

I would like to review these files:

 

  • /etc/odbc.ini
  • /etc/odbcinst.ini
Contributor
Posts: 60

Re: unable to connect to db using ODBC

Okay. Please find them here. Thanks!!

Contributor
Posts: 60

Re: unable to connect to db using ODBC

Contributor
Posts: 60

Re: unable to connect to db using ODBC

Hi Alex,

 

Sorry, Have semt you the wrong files. Please find the correct files here.

Thanks,

Sri

 

 

Contributor
Posts: 60

Re: unable to connect to db using ODBC

SAS Employee
Posts: 413

Re: unable to connect to db using ODBC

@AmitSri,

 

Thanks. Please add this logger to /opt/sas/viya/config/etc/cas/default/logconfig.xml:

<logger name="App.cas.tkcastkts">
<level value="trace"/>
</logger>

Restart CAS server, repeat the problem and show me the most recent CAS server log.

Contributor
Posts: 60

Re: unable to connect to db using ODBC

Thanks Alex!!

I have added the logger to the xml. Now, to restart the cas server, Should I setup the cascontroller to run as a service?
SAS Employee
Posts: 413

Re: unable to connect to db using ODBC

@AmitSri,

 

Just use this command:

 

sudo systemctl restart sas-viya-cascontroller-default
Contributor
Posts: 60

Re: unable to connect to db using ODBC

Okay.. its alraedy a service available at /etc/init.d. So I had restarted it. Will send the log in a while. Thanks!!
Contributor
Posts: 60

Re: unable to connect to db using ODBC

Hi Alex,

 

Please find the log here. Kindly have a look at it and suggest us. Thanks!!

 

 

Attachment
Ask a Question
Discussion stats
  • 20 replies
  • 412 views
  • 3 likes
  • 3 in conversation