Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syvMK-0035sU-Mo for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2024 15:45:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1syvMI-002doW-GT for pgsql-general@arkaria.postgresql.org; Thu, 10 Oct 2024 15:45:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syvMH-002doB-2U for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2024 15:45:46 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syvMA-000DyA-5G for pgsql-general@lists.postgresql.org; Thu, 10 Oct 2024 15:45:44 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id A9AD713802A6; Thu, 10 Oct 2024 11:45:36 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 10 Oct 2024 11:45:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1728575136; x=1728661536; bh=vy9DuJ5+KfqtsfiyHayWadg1+pvwjvYqRlgniHD5cJY=; b= qAvCsCP2CJa/EY+g2ZXzDqucg3RKz3rR9O+Pas9zpP5xfXUkNe2mQhpkxw593mAk 3hxZmFacDyrElP0hJdOAX6y36RTdnLQVU4VDWIALx5XLPPJDPEvQB5X1rlBQwfAF S9+HHnDVz4yAsoO+wUG0wQ7ZMa0+zFk+P+Q3vqH1zYtV/3AGHOlg0qEZQp6RQwxK b0D7dW8sGagYM2No+LHAGyEiUnOfEKtELTg2IHZsPvgiwepIIh8tRwDcgifpA33u eJBa4M3T/rCgwy9kDjcosMy4Zw7hcPNT58jgeELrKehuIf9b8bnXV9WvtQMsiy5l G0Zgqxwe+TVQUKpzfFNYnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728575136; x= 1728661536; bh=vy9DuJ5+KfqtsfiyHayWadg1+pvwjvYqRlgniHD5cJY=; b=V meEnqHz+6EDA9VKTiYS6C01SnrzTPV7XFqA9EjlTizkiP0H9fmxy0cbbkZrRe0hM OM3Xaw5PtAqoqGrXI5H3MrNB6cHkidCNjcamFxKLrjX29DyP7ATuuDaPizKmmNVw TSQQRJG8c+U8MPHOkXWox28yq2A25whPiGBUoJKLU/G/UmjiBRzy1TOrXHLnnk0u aeRc0mU/3yN/kb53qaOA/XTn/XZsX8spCP+RzEeN+hRqH+2AEyRm/ko/Ke5STPs1 DHID+eRknW5XIFsaoKHpPH6AJ0hJlpn3Fs0TCAcAEBCYqYctMFLCZ7Qfxg81QoEq S1PCUmhJVmAHV5eDoX4LA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefhedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghr uceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrth htvghrnhepheetuddtffdvjedviefftedugfeugeduieeiueevgfegieeuveehledthefg gffgnecuffhomhgrihhnpehpohhsthhgrhgvshhonhhlihhnvgdrtghomhdpshgthhhovg hnmhgrtghkvghrshdruggvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughr vggrshdrthhhuhgvrhhmrghnnhesshgthhhovghnmhgrtghkvghrshdruggvpdhrtghpth htohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdho rhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Oct 2024 11:45:35 -0400 (EDT) Message-ID: <8023c908-bf4a-4e04-a0a3-2ce5cfebe9b2@aklaver.com> Date: Thu, 10 Oct 2024 08:45:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Connection between PostgreSQL and SAP HANA database To: =?UTF-8?Q?Th=C3=BCrmann=2C_Andreas?= , "'pgsql-general@lists.postgresql.org'" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 (adrian.klaver@aklaver.com > > > > >) 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 (ronljohnsonjr@gmail.com ) > 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 (adrian.klaver@aklaver.com > ) 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.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 > > > 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 > > andreas.thuermann@schoenmackers.de > > > ------------------------------------------------------------------------ > ** > Unsere aktuellen Datenschutzhinweise gemäß Artikel 13 DSGVO finden Sie > hier: Kunden >  / Bewerber . > > > 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 > > > > -- Adrian Klaver adrian.klaver@aklaver.com