Skip to Content
Technical Articles
Author's profile photo Yogananda Muthaiah

How to connect Postgres from SAP BTP to Local Playground

Dear All,

Are you interested in learning how to securely connect a Postgres database from SAP BTP to a local playground?

Connecting a Postgres database from SAP BTP to a local playground can be a complex and daunting process. However, it‘s very important to familiarize yourself with the process, and understand the best practices for security and scalability when connecting a Postgres database to a local playground.

In this blogpost, we will explore how to securely connect a Postgres database from SAP BTP to a local playground.

I will cover what Postgres is, the advantages of using Postgres for local playgrounds, different methods of connecting Postgres to a local playground, best practices for security and scalability when connecting Postgres to a local playground, and resources to help you get started. Postgres is an opensource relational database that provides a strong foundation for highlyscalable applications.

Postgres offers advanced features such as high availability, transactionrecognition locking, and pointintime recovery, which makes it the ideal choice for high performance applications. Postgres for local playgrounds offers the following advantages:


Postgres supports a long list of database features, including several enterprise features. Aside from standard relational database features, some of the most notable features in Postgres are:

  • Streaming replication
  • Schemas
  • User-defined objects like operators, data types, and functions
  • Nested transactions
  • Table inheritance
  • Partitioning
  • Several unusual data types, like Money, Geometry, IP addresses, JSON, and data ranges.
  • Can execute stored procedures in over a dozen programming languages, including Java, Perl, Python, Ruby, and C/C++.

Due to its first-class support for JSON, Postgres is often a good alternative to “No-SQL” databases like MongoDB. Read more about PostgreSQL

Architecture


Let’s connect to PostgreSQL DB from SAP BTP as Playground – DBeaver

Go to BTP and enable PostgreSQL Hyperscaler like below screen and be ready with Credentials which is generated in Service Keys.

In view credentials button, you will see PostgreSQL database credentials to connect your DB via SSH Tunnel.

Watch out my previous blog on how to connect : PostgreSQL SSH Tunnel

Now I can connect PostgreSQL DB Successfully via SSL cert through SSH Tunnel.

DB Administrator can now query & access core PG tables

 

Security

This section provides an overview of the security-relevant information that applies to the PostgreSQL service.

Checkout


Sizing

PostgreSQL, hyperscaler option’ service is available as a CPEA-only service and is also available on the SAP StoreInformation published on SAP site.

The service is meant to be a replacement for the retired service -> ‘PostgreSQL on SAP BTP’, and is built on hyperscaler PostgreSQL offerings.

Checkout


Frequently Asked Questions (FAQs)

Checkout


Limitations

What is the Number of max_connections for PostgreSQL instances in AWS Regions?

Checkout

What is the Number of max_connections for PostgreSQL Instances in Azure Regions?

Checkout


 

References

 

SAP BTP PostgreSQL Help Documentation

Mac Users for Postgres app

Enhance your Postgres skills

 

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Frank Clement_Educ
      Frank Clement_Educ

      Hello Yogananda,

      Thanks a lot for your post.
      Trying to achieve the same but receiving a connection timeout error : "Connection attempt timed out."

      Wondering about which field you used from Service Key into the main tab of DBeaver (it is not shown clearly in details in your post).

      Otherwise is there any connection that needs to be opened prior to test connection on BTP/CF ?

      Regards,
      Frank

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Frank Clement_Educ

      Seems like you missed this link which is in above step.. where SSH Tunnel needs to be established in order to connect via DBeaver

      https://blogs.sap.com/2023/06/19/sap-btp-postgresql-ssh-tunnel-and-ssh-tunneling-explained/

      Author's profile photo Abhay Rajhans
      Abhay Rajhans

      Hi Yogananda

       

      Thank you for the blog. I am able to connect to PostgreSql using DBeaver. But everytime I restart my machine I need to establish SSH tunnel again using CLI. Is there any way where permanent connection can be made?

      Regards

      Abhay Rajhans

      Author's profile photo Yogananda Muthaiah
      Yogananda Muthaiah
      Blog Post Author

      Abhay Rajhans

      Its high restricted and it cannot be made available online 24hrs and secured. Answer is no way to make permanent connection establish