BookmarkSubscribeRSS Feed
harsht283raj
Calcite | Level 5

I am trying to set up SAS ODBC connection to sas server installed on linux. I have sas ODBC installed on my local (windows)cand now I need to connect to the sas session on the SAS server. My approach : trying to create a port forward using putty on windows and then configuring ODBC.

Is my approach correct.

9 REPLIES 9
SASKiwi
PROC Star

What client tools will you be using to connect to your SAS server via ODBC? When you say you installed SAS ODBC on your PC are you referring to the SAS ODBC driver, SAS/ACCESS to ODBC along with Base SAS or something else?

 

If you are connecting SAS on your PC with your server SAS then ODBC is definitely not the right solution - SAS/CONNECT is. ODBC is for connecting SAS to non-SAS products.

harsht283raj
Calcite | Level 5

Yes I have SAS ODBC driver installed on my system

harsht283raj
Calcite | Level 5

so basically, I need ODBC to extract data out of SAS but my SAS server is not on local.

so I was thinking of creating an SSH tunnel with port forward to the sas server and then creating ODBC setup.

SASKiwi
PROC Star

But extract data out of SAS with what non-SAS tool? I suggest you talk to your SAS administrator about getting this set up. Most likely you will need to sort out SAS server firewall rules and the security configuration of the ODBC connection including how you will logon.  

SASKiwi
PROC Star

I think @AhmedAl_Attar has given you the right reference. Since you a querying a remote SAS server you will need not only Base SAS but also SAS/SHARE installed.

AhmedAl_Attar
Rhodochrosite | Level 12

Check the following page What Is the SAS ODBC Driver?

From the On-line User Guide documentation for the SAS ODBC Driver. It describes the purpose of this driver and how it can be used and what other components it requires.

 

Ahmed 

AhmedAl_Attar
Rhodochrosite | Level 12

Hi,

 

If I have understood your requirements correctly, I think you are going about it the wrong way!

 

To gain access to SAS Data Sets/Files residing on a Linux Server from Windows programs, your options are

1. Use SAS/CONNECT if you have it licesened

     Connecting Simply with SAS/CONNECT®

     SAS/CONNECT 

 

2. Use Linux Samba Server, which helps you to share Linux files and printers with Windows-based PCs and other operating systems

 

Hope this helps.

Ahmed

SangramjitPanda
Obsidian | Level 7

Hi,

 

#1 Solution for Connecting to other Databases from SAS 

 

1. Install ODBC driver on linux host where SAS Compute Tier is installed

2. Try to edit the odbc.ini file and provide the Server Details like Database name, Server name etc.

3. Create New Server Connection for ODBC engine in SAS Management Console and then create SAS ODBC library for connecting to Database: Optional

4. Or else you can directly use Libname statement in any SAS Application(Enterprise Guide or SAS Studio) for connecting to Databases.

 

#2 Solution for Sharing Data/files residing in SAS Server(Linux) to Windows Local

 

1. You can use the SAMBA Shared mapped to the Linux Folders where the data is resding

2. Or else you can use SAS FTP Libname statement for pull/push files between the Systems

3. Or else you can Install FTP Client on Linux Host and then write ftp linux scripts for transferring the files between systems

 

Hope either one of the solution will resolve your concern.

 

Thanks,

Sangramjit 

ccaulkins9
Pyrite | Level 9
Raj -
If you have an ODBC to connect to a database, you need only to set up the DB connection string correctly on the SAS server and the data library.
e-SAS regards,

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 3503 views
  • 0 likes
  • 5 in conversation