Architecting, installing and maintaining your SAS environment

SAS ODBC setup using ssh tunnel via Putty on windows

Reply
Occasional Contributor
Posts: 7

SAS ODBC setup using ssh tunnel via Putty on windows

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.

Super User
Posts: 3,260

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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.

Occasional Contributor
Posts: 7

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Yes I have SAS ODBC driver installed on my system

Occasional Contributor
Posts: 7

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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.

Super User
Posts: 3,260

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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.  

Super User
Posts: 3,260

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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.

Regular Contributor
Posts: 219

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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 

Regular Contributor
Posts: 219

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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

Occasional Contributor
Posts: 10

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj

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 

Contributor
Posts: 33

Re: SAS ODBC setup using ssh tunnel via Putty on windows

Posted in reply to harsht283raj
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.
Ask a Question
Discussion stats
  • 9 replies
  • 415 views
  • 0 likes
  • 5 in conversation