Architecting, installing and maintaining your SAS environment

SAS ODBC connection to SQl Server

Frequent Contributor
Posts: 114

SAS ODBC connection to SQl Server



I have a requirement to connect to SQL Server database from SAS. So Before editing the odbc.ini, I have checked whether the SQL server database and port are opened from SAS servr.


cat < /dev/tcp/<Server_name>/<Port_no>.


And I haven't got connection refused output. So the database and port are opened in SQL server database and I think I can able to establish the connection.


Then I have edited the odbc.ini file and created a DSN. And created a SQL Server library in SAS SMC.


But while accessing the database , I have got a error that Connection refused ,verify hostname and port number .


Can anybody help me on this. Thanks in advance.

Super User
Posts: 5,852

Re: SAS ODBC connection to SQl Server

Posted in reply to Helannivas
It's always good to verify the connection using a third party tool.
On Windows you got plenty of options. In UNIX/Linux iSQL is available.
Data never sleeps
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation