BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jaiganesh
Obsidian | Level 7

Hello,

 

I'm trying to get the Microsoft SQL connected to SAS, I've followed the attached document till the page number 13 , from page 4 (libname statement ) , using below code , However couldn't able to get the desired result.

 

Code1:

proc sql;
connect to odbc as mycon ( Datasrc='*****' USER="******" PASSWORD="*****");
quit;

 

ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Data source name not found and no default driver
specified

 

if i change "odbc " to "SQLSVR" then getting below error

 

Code2:

proc sql;
connect to SQLSVR as mycon ( Datasrc='*****' USER="******" PASSWORD="*****");
quit;


ERROR: The SQLSVR engine cannot be found.
ERROR: A Connection to the SQLSVR DBMS is not currently supported, or is not installed at your site.

 

 

Kindly suggest on this...

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

The CLI error suggests your SAS Application server is running on Unix. If that is the case, then the attached document will not be helpful as that is for SAS running on Windows.

 

On Unix you need to configure a file called odbc.ini. This post may be useful:

https://communities.sas.com/t5/SAS-Data-Management/Example-of-DSN-less-SQL-Server-connection-from-Li...

 

Your SQLSVR error suggests that the SAS product SAS/ACCESS to SQL Server is not installed.

 

View solution in original post

4 REPLIES 4
AnandVyas
Ammonite | Level 13
Is your SAS Session executing on the same machine where the DSN setup is configured? Usually the engine connot be found error when the session isn't able to find the DSN..
jaiganesh
Obsidian | Level 7

MY SAS is running on the Linux, MY DSN is configured on the Windows.

 

Kindly suggest.

AnandVyas
Ammonite | Level 13
I think you can try this doc - https://www.easysoft.com/support/kb/kb01029.html
SASKiwi
PROC Star

The CLI error suggests your SAS Application server is running on Unix. If that is the case, then the attached document will not be helpful as that is for SAS running on Windows.

 

On Unix you need to configure a file called odbc.ini. This post may be useful:

https://communities.sas.com/t5/SAS-Data-Management/Example-of-DSN-less-SQL-Server-connection-from-Li...

 

Your SQLSVR error suggests that the SAS product SAS/ACCESS to SQL Server is not installed.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2392 views
  • 1 like
  • 3 in conversation