cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect to postgres Database using CAPM application ?

vineela_p
Explorer
0 Kudos

Hi,

We would like to build CAPM application by connecting to Postgres DB (BTP, hyperscalers). We are going with AWS rds provider for postgres DB (using the provider connection details instead of localhost). How to connect to postgres db locally in visual studio code using Nodejs and deploy the tables to BTP CF?

Please could you guide.

Thank you!

gregorw
Active Contributor
0 Kudos

Please clarify if you use:

PostgreSQL on SAP BTP, hyperscaler option.

or

the AWS RDS provider for PostgreSQL directly?

vineela_p
Explorer
0 Kudos

Hi gregorw - we use Postgresql on sap btp hyperscaler option.

View Entire Topic
gregorw
Active Contributor
0 Kudos

Please check this example in the documentation how you can connect:

Export Data from PostgreSQL Service Instance

vineela_p
Explorer
0 Kudos

Thank you gregorw ! But when I execute the below command, I get this error.

  • $ cf ssh -L 63306:<hostname>:<port> YOUR-HOST-APP

Also, when i try to connect to postgresql db in pgadmin4, we are getting the below issue. Please could you guide where we are going wrong?

gregorw
Active Contributor
0 Kudos

Did you run the command:

cf enable-ssh YOUR-HOST-APP

?

I had also issues connecting with psql. But I was able to connect using DBeaver.

vineela_p
Explorer
0 Kudos

gregorw - yes, we have enabled SSH to the deployed app.

when we try to connect using DBeaver, still the issue is same. Any suggestions on this please.