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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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