BookmarkSubscribeRSS Feed
Pato485
Calcite | Level 5

Is there any possible way to connect to postgresql from sas EG - program?

 

Tried this but it is not working from program in sas EG:

 

DRIVER=SQL;CONOPTS=((DRIVER=POSTGRES;CATALOG=public;UID=myuid;PWD=123pass;
SERVER=aurora-instance-1.ctkz01uv9xcr.us-east-1.rds.amazonaws.com;
PORT=5432;DB=aurora))

                                   

Thanks for any help.                                                                                                                                                                                                                                                                      

1 REPLY 1
LinusH
Tourmaline | Level 20

You probably can, but there are of course some constraints.

Your "code" is the definition of a data source.

To able to actually connect to the source from SAS, you need to submit a LIBNAME statement, which in return refers to the information you provided.

Exactly depends on your set up (EG connects to SAS server or local PC SAS), your SAS license (SAS/ACCESS to....), and of course possibility to connect to that data source given firewalls etc.

 

This is for Postgres SAS/ACCESS engine, might be slightly different if you are using SAS/ACCESSS ODBC engine:

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p0nc2tikruabp6n1008nkdf0buee.htm

 

Data never sleeps

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 1027 views
  • 0 likes
  • 2 in conversation