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?”
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.
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.
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!
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.