<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Connect SAP CAP project in BAS to Postgres database in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaa-p/12697768#M4764393</link>
    <description>&lt;P&gt;You will need to setup an ssh tunnel with port forwarding for accessing postgreSQL server from outside Cloud Foundry environment. The same setup explained in &lt;A href="https://help.sap.com/docs/PostgreSQL/b3fe3621fa4a4ed28d7bbe3d6d88f036/69036a6c0b3b4377a1ae6a1edd084988.html" target="_blank"&gt;Export Data from PostgreSQL Service Instance | SAP Help Portal&lt;/A&gt; can be used. &lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 14:38:07 GMT</pubDate>
    <dc:creator>former_member2839</dc:creator>
    <dc:date>2023-02-03T14:38:07Z</dc:date>
    <item>
      <title>Connect SAP CAP project in BAS to Postgres database</title>
      <link>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaq-p/12697767</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I need help connecting a SAP CAP project running on the BAS to a postgres database hosted on the BTP.&lt;/P&gt;
  &lt;P&gt;I setup a project according to &lt;A href="https://blogs.sap.com/2020/11/16/getting-started-with-cap-on-postgresql-node.js/" target="_blank"&gt;this blog&lt;/A&gt; with regards to the github projects of &lt;A href="https://github.com/sapmentors/cds-pg" target="_blank"&gt;cds-pg&lt;/A&gt; and &lt;A href="https://github.com/mikezaschka/cds-dbm" target="_blank"&gt;cds-dbm&lt;/A&gt;.&lt;/P&gt;
  &lt;P&gt;I created a service key in the postgres database instance on the BTP and stored the credentials in the env file for VCAP_SERVICES.&lt;/P&gt;
  &lt;P&gt;Trying to deploy with cds-pg (npx cds-pg deploy --to db) executes without an error but nothing is deploy. However trying to deploy with cds-dbm (npx cds-dbm deploy) results into an connection error.&lt;/P&gt;
  &lt;P&gt;How do I properly setup the project so I can deploy to the postgres database from BAS?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 07:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaq-p/12697767</guid>
      <dc:creator>pascal_renner</dc:creator>
      <dc:date>2023-02-03T07:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Connect SAP CAP project in BAS to Postgres database</title>
      <link>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaa-p/12697768#M4764393</link>
      <description>&lt;P&gt;You will need to setup an ssh tunnel with port forwarding for accessing postgreSQL server from outside Cloud Foundry environment. The same setup explained in &lt;A href="https://help.sap.com/docs/PostgreSQL/b3fe3621fa4a4ed28d7bbe3d6d88f036/69036a6c0b3b4377a1ae6a1edd084988.html" target="_blank"&gt;Export Data from PostgreSQL Service Instance | SAP Help Portal&lt;/A&gt; can be used. &lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 14:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaa-p/12697768#M4764393</guid>
      <dc:creator>former_member2839</dc:creator>
      <dc:date>2023-02-03T14:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Connect SAP CAP project in BAS to Postgres database</title>
      <link>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaa-p/12697769#M4764394</link>
      <description>&lt;P&gt;Thank you for the resource. I established a ssh tunnel successfully and setup a fresh project like here: &lt;A href="https://github.com/sapmentors/cds-pg" target="test_blank"&gt;https://github.com/sapmentors/cds-pg&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I set the credentials according to the service key, the host to localhost and the port to the port i opened with cf ssh command. However, the deploy command still can't reach the postgres. It fails with a connection refused on port 5432 - but i specified 63306 on the ssh tunnel and put that into the credentials. Any idea on how to fix this? &lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 09:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/connect-sap-cap-project-in-bas-to-postgres-database/qaa-p/12697769#M4764394</guid>
      <dc:creator>pascal_renner</dc:creator>
      <dc:date>2023-02-16T09:52:43Z</dc:date>
    </item>
  </channel>
</rss>

