Re: Connection between PostgreSQL and SAP HANA database

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Thürmann, Andreas <Andreas(dot)Thuermann(at)schoenmackers(dot)de>, "'pgsql-general(at)lists(dot)postgresql(dot)org'" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Connection between PostgreSQL and SAP HANA database
Date: 2024-09-09 15:06:39
Message-ID: 3cb13eb6-b1fb-4b83-bab5-b03c159b8238@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/9/24 00:53, Thürmann, Andreas wrote:
> Hello everyone,
>
> I'm currently trying to establish a connection between PostgreSQL and a
> SAP HANA database. Unfortunately, so far without success.
>
> SAP's own ODBC driver works correctly and I can query the HANA database
> using an ISQL command. However, I can't establish a connection from
> PostgreSQL.
>
> I used the following commands to establish the connection:
>
> CREATE SERVER hana_server
>
> FOREIGN DATA WRAPPER odbc_fdw
>
> OPTIONS (dsn 'SAP_ODBC_DNS');
>
> CREATE FOREIGN TABLE hana_table (
>
>   matnr VARCHAR(40)
>
> )
>
> SERVER hana_server
>
> OPTIONS (table 'SAPABAP1.MARA');
>
> CREATE USER MAPPING FOR postgres
>
> SERVER hana_server
>
> OPTIONS (odbc_user 'secret_user', odbc_password 'secret_password');
>
> Can anyone tell me where the error is?

Postgres version?

SAP HANA version?

odbc_fdw version and where did you get it from?

How do you know you are not making a connection?

Have you looked at Postgres log for errors?

> andreas(dot)thuermann(at)schoenmackers(dot)de
> <mailto:andreas(dot)thuermann(at)schoenmackers(dot)de>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-09-09 15:31:40 Re: postgresql FDW vs dblink for DDL
Previous Message Adrian Klaver 2024-09-09 15:00:19 Re: infinite loop in an update statement