BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
9Squirrels
Calcite | Level 5

We have a new SAS VIYA environment set up on Windows, my access to it is via SAS Studio in a web browser.

I have some legacy code to run which uses ODBC libnames to connect to SQL Server databases, and we have SAS/ACCESS for ODBC installed.

How do I set up the ODBC connection so that the libname can point to it? Is there a tool within SAS Studio to allow me to do that or will I need to log into the Windows environment on the server that SAS is installed on to set up the ODBC connection there? 

I've got the SAS side of it set up fine:

libname ABS2016 ODBC datasrc='ABSGEO2016';

 

I just need to know how I go about setting up the ODBC connection. On the old server I had access to the OS to be able to do this, but not on the new one.

 

Thanks

Chris.

1 ACCEPTED SOLUTION

Accepted Solutions
9Squirrels
Calcite | Level 5

Thanks @SASKiwi , unfortunately as I don't have access to the OS, the link isn't much help as it requires you to add/update settings files to the SAS install.

 

However your note that I could set up all the details within the libname ODBC statement helped me look elsewhere and I eventually found some examples here:

http://support.sas.com/kb/52/777.html

 

And that's fixed my problem

75         libname gnaf odbc noprompt="driver=SQL Server;
 76                                      server=blahblah;
 77                                      database=GNAF_AUG2018;
 78                                      Trusted_Connection=yes"
 79                           schema=dbo;
 NOTE: Libref GNAF was successfully assigned as follows: 
       Engine:        ODBC 
       Physical Name: 

Cheers

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

The good news with running on Windows makes it easy to define ODBC connections without using data sources at all. You can specify everything in the connection string. What database(s) are you connecting to? If it is SQL Server this post may be helpful:

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

9Squirrels
Calcite | Level 5

Thanks @SASKiwi , unfortunately as I don't have access to the OS, the link isn't much help as it requires you to add/update settings files to the SAS install.

 

However your note that I could set up all the details within the libname ODBC statement helped me look elsewhere and I eventually found some examples here:

http://support.sas.com/kb/52/777.html

 

And that's fixed my problem

75         libname gnaf odbc noprompt="driver=SQL Server;
 76                                      server=blahblah;
 77                                      database=GNAF_AUG2018;
 78                                      Trusted_Connection=yes"
 79                           schema=dbo;
 NOTE: Libref GNAF was successfully assigned as follows: 
       Engine:        ODBC 
       Physical Name: 

Cheers

SASKiwi
PROC Star

Cool. Your solution is exactly what we do. Glad to be able to help.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 5292 views
  • 2 likes
  • 2 in conversation