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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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