public inbox for [email protected]
help / color / mirror / Atom feedConnection between PostgreSQL and SAP HANA database
9+ messages / 2 participants
[nested] [flat]
* Connection between PostgreSQL and SAP HANA database
@ 2024-09-09 07:53 Thürmann, Andreas <[email protected]>
2024-09-09 15:06 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
0 siblings, 2 replies; 9+ messages in thread
From: Thürmann, Andreas @ 2024-09-09 07:53 UTC (permalink / raw)
To: '[email protected]' <[email protected]>
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?
Mit freundlichen Grüßen
i. A. Andreas Thürmann
Teamleitung IT-Applikationen & BI
IT-Applikationen & BI
Schönmackers Umweltdienste GmbH & Co. KG
Hooghe Weg 1
47906 Kempen Tel:
Fax:
E-Mail:
+49 (2152) 207 6765
[email protected]<mailto:[email protected]>
________________________________
Unsere aktuellen Datenschutzhinweise gemäß Artikel 13 DSGVO finden Sie hier: Kunden <https://www.schoenmackers.de/wp-content/uploads/2018/05/Datenschutzerklaerung-DSGVO_Kundeninfo.pdf; / Bewerber <https://jobs.schoenmackers.de/content/Datenschutzerklaerung/?locale=de_DE; .
[cid:sud_logo2.png]
Schönmackers Umweltdienste GmbH & Co. KG, Hooghe Weg 1, 47906 Kempen, Sitz: Kempen, Amtsgericht Krefeld, HRA 3763,
p.h.G.: Schönmackers Umweltdienste Verwaltung GmbH, Sitz: Kempen, Amtsgericht Krefeld, HRB 6153,
Geschäftsführer: Oliver Zimmermann
www.schoenmackers.de <http://www.schoenmackers.de/;
[cid:cshop.png]<https://www.schoenmackers.de/containershop/;
Attachments:
[application/octet-stream] sud_logo2.png (5.9K, 3-sud_logo2.png)
download
[application/octet-stream] cshop.png (44.5K, 4-cshop.png)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-09-09 15:06 ` Adrian Klaver <[email protected]>
1 sibling, 0 replies; 9+ messages in thread
From: Adrian Klaver @ 2024-09-09 15:06 UTC (permalink / raw)
To: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
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?
> [email protected]
> <mailto:[email protected]>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 9+ messages in thread
* Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-09-09 15:35 ` Thürmann, Andreas <[email protected]>
2024-09-12 15:25 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
2024-10-10 09:54 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
1 sibling, 2 replies; 9+ messages in thread
From: Thürmann, Andreas @ 2024-09-09 15:35 UTC (permalink / raw)
To: '[email protected]' <[email protected]>
Ron Johnson ([email protected]<mailto:[email protected]>) asked me the following. Answers below:
1. What error did you get?
No error, the query runns into infinity (>30 min.) without a result.
2. Which command caused the error?
Test-query like SELECT * FROM hana_table LIMIT 10;
3. What version of the odbc_fdw are you using?
Latest, Version 0.5.2
4. What version of Postgresql are you using?
PostgreSQL 16 with pgAdmin 16 4.2.2
Adrian Klaver ([email protected]<mailto:[email protected]>) asked:
Postgres version?
PostgreSQL 16 with pgAdmin 16 4.2.2
SAP HANA version?
SAP HANA database 2.00.07400
odbc_fdw version and where did you get it from?
I use the odbc_fdw from https://www.postgresonline.com/journal/index.php?/archives/409-PostgreSQL-16-64-bit-for-Windows-FDWs...
How do you know you are not making a connection?
No results from the query, no suggestions in the foreign table creation menu
Have you looked at Postgres log for errors?
No errors during the query in the log, only a "unrecognized winsock error 10054" at the start of the pg client
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?
Mit freundlichen Grüßen
i. A. Andreas Thürmann
Teamleitung IT-Applikationen & BI
IT-Applikationen & BI
Schönmackers Umweltdienste GmbH & Co. KG
Hooghe Weg 1
47906 Kempen Tel:
Fax:
E-Mail:
+49 (2152) 207 6765
[email protected]<mailto:[email protected]>
________________________________
Unsere aktuellen Datenschutzhinweise gemäß Artikel 13 DSGVO finden Sie hier: Kunden <https://www.schoenmackers.de/wp-content/uploads/2018/05/Datenschutzerklaerung-DSGVO_Kundeninfo.pdf; / Bewerber <https://jobs.schoenmackers.de/content/Datenschutzerklaerung/?locale=de_DE; .
[cid:sud_logo2.png]
Schönmackers Umweltdienste GmbH & Co. KG, Hooghe Weg 1, 47906 Kempen, Sitz: Kempen, Amtsgericht Krefeld, HRA 3763,
p.h.G.: Schönmackers Umweltdienste Verwaltung GmbH, Sitz: Kempen, Amtsgericht Krefeld, HRB 6153,
Geschäftsführer: Oliver Zimmermann
www.schoenmackers.de <http://www.schoenmackers.de/;
[cid:cshop.png]<https://www.schoenmackers.de/containershop/;
Attachments:
[application/octet-stream] sud_logo2.png (5.9K, 3-sud_logo2.png)
download
[application/octet-stream] cshop.png (44.5K, 4-cshop.png)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-09-12 15:25 ` Adrian Klaver <[email protected]>
1 sibling, 0 replies; 9+ messages in thread
From: Adrian Klaver @ 2024-09-12 15:25 UTC (permalink / raw)
To: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
On 9/9/24 08:35, Thürmann, Andreas wrote:
> Adrian Klaver ([email protected]
> <mailto:[email protected]>) asked:
>
> Postgres version?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
Have you tried tried this using psql?
>
> Have you looked at Postgres log for errors?
>
> No errors during the query in the log, only a
> „unrecognized winsock error 10054“ at the start of the pg client
Have you looked at the SAP HANA logs to see if a connection is even
attempted?
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 9+ messages in thread
* Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-10-10 09:54 ` Thürmann, Andreas <[email protected]>
2024-10-10 15:45 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
1 sibling, 1 reply; 9+ messages in thread
From: Thürmann, Andreas @ 2024-10-10 09:54 UTC (permalink / raw)
To: '[email protected]' <[email protected]>; +Cc: '[email protected]' <[email protected]>
Please excuse the late reply. I didn't have time to continue working on this project.
I still don't get a response to the query. The query continues indefinitely and the data output window shows only "Waiting for the query to complete..."
In the SAP HANA logs i can't find any access of my PostgreSQL-query, the Microsoft solution works perfectly and is visible in the log.
Is it not possible to connect to the SAP HANA database with PostgreSQL or are there errors in my setup?
My current expectation of the data stream: PostgreSQL -> odbc_fdw -> HDBODBC (SAP-driver) -> SAP HANA database
But how can I set up the connection between the two ODBC drivers?
Has anyone already implemented a project like this and can tell me how to establish the connection to SAP?
> Adrian Klaver ([email protected]<mailto:[email protected]>
> <mailto:[email protected]>) asked:
>
> Postgres version?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
Have you tried tried this using psql?
> Have you looked at Postgres log for errors?
>
> No errors during the query in the log, only a
> "unrecognized winsock error 10054" at the start of the pg client
Have you looked at the SAP HANA logs to see if a connection is even attempted?
Ron Johnson ([email protected]<mailto:[email protected]>) asked me the following. Answers below:
1. What error did you get?
No error, the query runns into infinity (>30 min.) without a result.
2. Which command caused the error?
Test-query like SELECT * FROM hana_table LIMIT 10;
3. What version of the odbc_fdw are you using?
Latest, Version 0.5.2
4. What version of Postgresql are you using?
PostgreSQL 16 with pgAdmin 16 4.2.2
Adrian Klaver ([email protected]<mailto:[email protected]>) asked:
Postgres version?
PostgreSQL 16 with pgAdmin 16 4.2.2
SAP HANA version?
SAP HANA database 2.00.07400
odbc_fdw version and where did you get it from?
I use the odbc_fdw from https://www.postgresonline.com/journal/index.php?/archives/409-PostgreSQL-16-64-bit-for-Windows-FDWs...
How do you know you are not making a connection?
No results from the query, no suggestions in the foreign table creation menu
Have you looked at Postgres log for errors?
No errors during the query in the log, only a "unrecognized winsock error 10054" at the start of the pg client
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?
Mit freundlichen Grüßen
i. A. Andreas Thürmann
Mit freundlichen Grüßen
i. A. Andreas Thürmann
Teamleitung IT-Applikationen & BI
IT-Applikationen & BI
Schönmackers Umweltdienste GmbH & Co. KG
Hooghe Weg 1
47906 Kempen Tel:
Fax:
E-Mail:
+49 (2152) 207 6765
[email protected]<mailto:[email protected]>
________________________________
Unsere aktuellen Datenschutzhinweise gemäß Artikel 13 DSGVO finden Sie hier: Kunden <https://www.schoenmackers.de/wp-content/uploads/2018/05/Datenschutzerklaerung-DSGVO_Kundeninfo.pdf; / Bewerber <https://jobs.schoenmackers.de/content/Datenschutzerklaerung/?locale=de_DE; .
[cid:sud_logo2.png]
Schönmackers Umweltdienste GmbH & Co. KG, Hooghe Weg 1, 47906 Kempen, Sitz: Kempen, Amtsgericht Krefeld, HRA 3763,
p.h.G.: Schönmackers Umweltdienste Verwaltung GmbH, Sitz: Kempen, Amtsgericht Krefeld, HRB 6153,
Geschäftsführer: Sabrina Michelbrink, Oliver Zimmermann
www.schoenmackers.de <http://www.schoenmackers.de/;
[cid:cshop.png]<https://www.schoenmackers.de/containershop/;
Attachments:
[application/octet-stream] sud_logo2.png (5.9K, 3-sud_logo2.png)
download
[application/octet-stream] cshop.png (44.5K, 4-cshop.png)
download
[application/octet-stream] sud_logo2.png (5.9K, 5-sud_logo2.png)
download
[application/octet-stream] cshop.png (44.5K, 6-cshop.png)
download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 09:54 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-10-10 15:45 ` Adrian Klaver <[email protected]>
2024-10-11 08:23 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Adrian Klaver @ 2024-10-10 15:45 UTC (permalink / raw)
To: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
On 10/10/24 02:54, Thürmann, Andreas wrote:
> Please excuse the late reply. I didn't have time to continue working on
> this project.
>
> I still don't get a response to the query. The query continues
> indefinitely and the data output window shows only „Waiting for the
> query to complete...“
>
> In the SAP HANA logs i can’t find any access of my PostgreSQL-query, the
> Microsoft solution works perfectly and is visible in the log.
Are you running this on Windows?
>
> Is it not possible to connect to the SAP HANA database with PostgreSQL
> or are there errors in my setup?
>
> My current expectation of the data stream: PostgreSQL -> odbc_fdw ->
> HDBODBC (SAP-driver) –> SAP HANA database
Does this:
HDBODBC (SAP-driver) –> SAP HANA database
work?
Meaning, does test connection complete successfully.
What are the settings for odbc_fdw and the SAP driver?
>
> But how can I set up the connection between the two ODBC drivers?
>
> Has anyone already implemented a project like this and can tell me how
> to establish the connection to SAP?
>
> > Adrian Klaver ([email protected]
> <mailto:[email protected]>
>
> > <mailto:[email protected]
> <mailto:[email protected]>>) asked:
>
> >
>
> > Postgres version?
>
> >
>
> > PostgreSQL 16 with pgAdmin 16 4.2.2
>
> Have you tried tried this using psql?
>
> > Have you looked at Postgres log for errors?
>
> >
>
> > No errors during the query in the log, only a
>
> > „unrecognized winsock error 10054“ at the start of the pg client
>
> Have you looked at the SAP HANA logs to see if a connection is even
> attempted?
>
> Ron Johnson ([email protected] <mailto:[email protected]>)
> asked me the following. Answers below:
>
> 1. What error did you get?
>
> No error, the query runns into infinity (>30 min.) without a result.
>
> 2. Which command caused the error?
>
> Test-query like SELECT * FROM hana_table LIMIT 10;
>
> 3. What version of the odbc_fdw are you using?
>
> Latest, Version 0.5.2
>
> 4. What version of Postgresql are you using?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
>
> Adrian Klaver ([email protected]
> <mailto:[email protected]>) asked:
>
> Postgres version?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
>
> SAP HANA version?
>
> SAP HANA database 2.00.07400
>
> odbc_fdw version and where did you get it from?
>
> I use the odbc_fdw from
> https://www.postgresonline.com/journal/index.php?/archives/409-PostgreSQL-16-64-bit-for-Windows-FDWs... <https://www.postgresonline.com/journal/index.php?/archives/409-PostgreSQL-16-64-bit-for-Windows-FDWs...;
>
> How do you know you are not making a connection?
>
> No results from the query, no suggestions in the
> foreign table creation menu
>
> Have you looked at Postgres log for errors?
>
> No errors during the query in the log, only a
> „unrecognized winsock error 10054“ at the start of the pg client
>
> 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?
>
> Mit freundlichen Grüßen
>
> i. A. Andreas Thürmann
>
>
> Mit freundlichen Grüßen
>
> i. A. Andreas Thürmann
> Teamleitung IT-Applikationen & BI
> IT-Applikationen & BI
>
> Schönmackers Umweltdienste GmbH & Co. KG
> Hooghe Weg 1
> 47906 Kempen Tel:
> Fax:
> E-Mail:
> +49 (2152) 207 6765
>
> [email protected]
> <mailto:[email protected]>
>
> ------------------------------------------------------------------------
> **
> Unsere aktuellen Datenschutzhinweise gemäß Artikel 13 DSGVO finden Sie
> hier: Kunden
> <https://www.schoenmackers.de/wp-content/uploads/2018/05/Datenschutzerklaerung-DSGVO_Kundeninfo.pdf&g... Bewerber <https://jobs.schoenmackers.de/content/Datenschutzerklaerung/?locale=de_DE;.
>
>
> Schönmackers Umweltdienste GmbH & Co. KG, Hooghe Weg 1, 47906 Kempen,
> Sitz: Kempen, Amtsgericht Krefeld, HRA 3763,
> p.h.G.: Schönmackers Umweltdienste Verwaltung GmbH, Sitz: Kempen,
> Amtsgericht Krefeld, HRB 6153,
> Geschäftsführer: Sabrina Michelbrink, Oliver Zimmermann
> www.schoenmackers.de <http://www.schoenmackers.de/;
>
> <https://www.schoenmackers.de/containershop/;
>
>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 9+ messages in thread
* Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 09:54 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 15:45 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
@ 2024-10-11 08:23 ` Thürmann, Andreas <[email protected]>
2024-10-11 16:16 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Thürmann, Andreas @ 2024-10-11 08:23 UTC (permalink / raw)
To: 'Adrian Klaver' <[email protected]>; '[email protected]' <[email protected]>
Yes I run it under Windows, I also have a Linux server for testing.
Under Windows I know that the driver works because i use it already in another project (MS SQL Server with LinkedServer).
In Linux I can test the HDBODBC driver via command line and the ISQL command, this works fine.
I'm desperate about the PostgreSQL configuration. I have no idea how to configure it. I doubt the path (HDBODBC (SAP-driver) –> SAP HANA database) myself, but i cant connect to the HDBODBC driver directly via an extension.
My previous assumption was that i need a extension for the foreign data wrapper, the foreign server, foreign table and so on...
How can I use the system dsn in PostgreSQL?
-----Ursprüngliche Nachricht-----
Mit freundlichen Grüßen
i. A. Andreas Thuermann
Teamleitung IT-Applikationen & BI
IT-Applikationen & BI
Schoenmackers Umweltdienste GmbH & Co. KG
Hooghe Weg 1
47906 Kempen
Tel: +49 (2152) 207 6765
Fax:
E-Mail: [email protected]
Schönmackers Umweltdienste GmbH & Co KG, Hooghe Weg 1, 47906 Kempen, Sitz: Kempen, Amtsgericht Krefeld, HRA 3763,
p.h.G.: Schönmackers Umweltdienste Verwaltung GmbH, Sitz: Kempen, Amtsgericht Krefeld, HRB 6153,
Geschäftsführer: Sabrina Michelbrink, Oliver Zimmermann
https://www.schoenmackers.de
Hier geht es direkt zum Shop: https://www.schoenmackers.de/containershop
Von: Adrian Klaver <[email protected]>
Gesendet: Donnerstag, 10. Oktober 2024 17:46
An: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
Betreff: Re: Connection between PostgreSQL and SAP HANA database
On 10/10/24 02:54, Thürmann, Andreas wrote:
> Please excuse the late reply. I didn't have time to continue working
> on this project.
>
> I still don't get a response to the query. The query continues
> indefinitely and the data output window shows only „Waiting for the
> query to complete...“
>
> In the SAP HANA logs i can’t find any access of my PostgreSQL-query,
> the Microsoft solution works perfectly and is visible in the log.
Are you running this on Windows?
>
> Is it not possible to connect to the SAP HANA database with PostgreSQL
> or are there errors in my setup?
>
> My current expectation of the data stream: PostgreSQL -> odbc_fdw ->
> HDBODBC (SAP-driver) –> SAP HANA database
Does this:
HDBODBC (SAP-driver) –> SAP HANA database
work?
Meaning, does test connection complete successfully.
What are the settings for odbc_fdw and the SAP driver?
>
> But how can I set up the connection between the two ODBC drivers?
>
> Has anyone already implemented a project like this and can tell me how
> to establish the connection to SAP?
>
> > Adrian Klaver ([email protected]
> <mailto:[email protected]>
>
> > <mailto:[email protected]
> <mailto:[email protected]>>) asked:
>
> >
>
> > Postgres version?
>
> >
>
> > PostgreSQL 16 with pgAdmin 16 4.2.2
>
> Have you tried tried this using psql?
>
> > Have you looked at Postgres log for errors?
>
> >
>
> > No errors during the query in the log, only a
>
> > „unrecognized winsock error 10054“ at the start of the pg client
>
> Have you looked at the SAP HANA logs to see if a connection is even
> attempted?
>
> Ron Johnson ([email protected] <mailto:[email protected]>)
> asked me the following. Answers below:
>
> 1. What error did you get?
>
> No error, the query runns into infinity (>30 min.) without a result.
>
> 2. Which command caused the error?
>
> Test-query like SELECT * FROM hana_table LIMIT 10;
>
> 3. What version of the odbc_fdw are you using?
>
> Latest, Version 0.5.2
>
> 4. What version of Postgresql are you using?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
>
> Adrian Klaver ([email protected]
> <mailto:[email protected]>) asked:
>
> Postgres version?
>
> PostgreSQL 16 with pgAdmin 16 4.2.2
>
> SAP HANA version?
>
> SAP HANA database 2.00.07400
>
> odbc_fdw version and where did you get it from?
>
> I use the odbc_fdw from
> https://www.postgresonline.com/journal/index.php?/archives/409-Postgre
> SQL-16-64-bit-for-Windows-FDWs.html
> <https://www.postgresonline.com/journal/index.php?/archives/409-Postgr
> eSQL-16-64-bit-for-Windows-FDWs.html>
>
> How do you know you are not making a connection?
>
> No results from the query, no suggestions in the
> foreign table creation menu
>
> Have you looked at Postgres log for errors?
>
> No errors during the query in the log, only a
> „unrecognized winsock error 10054“ at the start of the pg client
>
> 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?
>
> Mit freundlichen Grüßen
>
> i. A. Andreas Thürmann
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 09:54 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 15:45 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
2024-10-11 08:23 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
@ 2024-10-11 16:16 ` Adrian Klaver <[email protected]>
2024-10-11 16:32 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
0 siblings, 1 reply; 9+ messages in thread
From: Adrian Klaver @ 2024-10-11 16:16 UTC (permalink / raw)
To: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
On 10/11/24 01:23, Thürmann, Andreas wrote:
Please do not post. The convention on this list is to inline or bottom
post. That makes it easier to follow the conversation flow.
See:
https://en.wikipedia.org/wiki/Posting_style
> Yes I run it under Windows, I also have a Linux server for testing.
> Under Windows I know that the driver works because i use it already in another project (MS SQL Server with LinkedServer).
> In Linux I can test the HDBODBC driver via command line and the ISQL command, this works fine.
Works fine as in you can connect to the SAP HANA database with the
HDBODBC driver?
>
> I'm desperate about the PostgreSQL configuration. I have no idea how to configure it. I doubt the path (HDBODBC (SAP-driver) –> SAP HANA database) myself, but i cant connect to the HDBODBC driver directly via an extension.
What are the settings/commands you are using for the various parts of
this connection chain:
1) HDBODBC driver.
2) ISQL command.
3) odbc_fdw.
4) Foreign server creation statements.
> My previous assumption was that i need a extension for the foreign data wrapper, the foreign server, foreign table and so on...
Yeah that is shown here:
https://github.com/CartoDB/odbc_fdw
In the Example section.
>
> How can I use the system dsn in PostgreSQL?
>
>
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Connection between PostgreSQL and SAP HANA database
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:35 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 09:54 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-10 15:45 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
2024-10-11 08:23 ` Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-10-11 16:16 ` Re: Connection between PostgreSQL and SAP HANA database Adrian Klaver <[email protected]>
@ 2024-10-11 16:32 ` Adrian Klaver <[email protected]>
0 siblings, 0 replies; 9+ messages in thread
From: Adrian Klaver @ 2024-10-11 16:32 UTC (permalink / raw)
To: Thürmann, Andreas <[email protected]>; '[email protected]' <[email protected]>
On 10/11/24 09:16, Adrian Klaver wrote:
> On 10/11/24 01:23, Thürmann, Andreas wrote:
>
> Please do not post. The convention on this list is to inline or bottom
That should have been do not top post.
> post. That makes it easier to follow the conversation flow.
>
> See:
--
Adrian Klaver
[email protected]
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2024-10-11 16:32 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09 07:53 Connection between PostgreSQL and SAP HANA database Thürmann, Andreas <[email protected]>
2024-09-09 15:06 ` Adrian Klaver <[email protected]>
2024-09-09 15:35 ` Thürmann, Andreas <[email protected]>
2024-09-12 15:25 ` Adrian Klaver <[email protected]>
2024-10-10 09:54 ` Thürmann, Andreas <[email protected]>
2024-10-10 15:45 ` Adrian Klaver <[email protected]>
2024-10-11 08:23 ` Thürmann, Andreas <[email protected]>
2024-10-11 16:16 ` Adrian Klaver <[email protected]>
2024-10-11 16:32 ` Adrian Klaver <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox