Architecting, installing and maintaining your SAS environment

SAS Viya: Connect to DB using ODBC - OS = Linux Redhat 7.4

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

SAS Viya: Connect to DB using ODBC - OS = Linux Redhat 7.4

Hi, 

 

I'm currently trying to setup a connection via CAS to a source database

 

I've setup the connection on the Linux server via unixODBC and it connects successfully. 

 

However when I try to access this via SAS it throws the following error below. I've updated the cas.settings file and restarted CAS service to update the ODBCINI, ODBCINSTINI & LD_LIBRARY_PATH Variables as required. These are reflected in the CAS Browser Console (tkcas.dsp). I'm struggling to figure out why the connection to the driver failed. 

 

ERROR: The connection to the data source driver failed.
ERROR: General Error - invalid Exception
ERROR: Function failed.
ERROR: The action stopped due to errors.
 
Any hints tips or pointers would be appreciated. 
 
Thanks, 
David 

Accepted Solutions
Solution
Friday
Occasional Contributor
Posts: 9

Re: SAS Viya: Connect to DB using ODBC - OS = Linux Redhat 7.4

Posted in reply to daithi1990

There was an encoding issue with the openODBC drivers and as such the encoding had to be added into the CASLIB statement. 

 

 caslib odbccaslib datasource=(srctype="odbc" odbc_dsn="MySQL" dm_unicode="utf-16" );

View solution in original post


All Replies
Solution
Friday
Occasional Contributor
Posts: 9

Re: SAS Viya: Connect to DB using ODBC - OS = Linux Redhat 7.4

Posted in reply to daithi1990

There was an encoding issue with the openODBC drivers and as such the encoding had to be added into the CASLIB statement. 

 

 caslib odbccaslib datasource=(srctype="odbc" odbc_dsn="MySQL" dm_unicode="utf-16" );

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 192 views
  • 0 likes
  • 1 in conversation