BookmarkSubscribeRSS Feed
bn820
Obsidian | Level 7

I am trying to connect SAS EG to our new database through ODBC. I am using the following code:

 

libname odbc1 odbc noprompt= " driver={PostgreSQL Unicode(x64)};user=XXXX;
password=XXXXX ;database=D_GFC19_UA5;ds=PostgreSQL35W";

 

and getting the following error:

ERROR: CLI error trying to establish connection: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection

       refused (0x0000274D/10061)     Is the server running on that host and accepting TCP/IP connections?connection to server at

       "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)    Is the server running on that host and accepting

       TCP/IP connections?”

3 REPLIES 3
SASKiwi
PROC Star

Is this the first time connecting to this server? Is SAS running on a server? What OS is SAS running on? If this is a first time connection then most likely firewall rules may need to be configured especially since you are getting connection refused messages. Talk to your SAS administrator as IT security will need to get involved.

bn820
Obsidian | Level 7
Yes. It's the first time connecting to this server. I will ty to reach out to IT department to inquire about any firewall restrictions that could be preventing the connection
SASKiwi
PROC Star

Also if your SAS Compute server runs on Windows, then you can remote into it and create a test data source in the ODBC Administrator then use the Test Connection button. That way you are taking SAS out of the loop and can demonstrate that failures are purely a data connection problem. 

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 753 views
  • 1 like
  • 2 in conversation