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 1snfyZ-005IgH-Va for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2024 15:06:48 +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 1snfyZ-00Dhw5-Jg for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2024 15:06:47 +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 1snfyZ-00Dhvp-7w for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2024 15:06:47 +0000 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1snfyT-000Jie-NW for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2024 15:06:46 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 052A51380221; Mon, 9 Sep 2024 11:06:41 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 09 Sep 2024 11:06:41 -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=fm3; t=1725894401; x=1725980801; bh=OfLm33DjVhWUXezFEQWTvaXpOVmM98H5Hpm1CfUg2vg=; b= gxsVzjax49d6CO96kQ9cNkU0k/ulwRTU7/ZgZQE6+1LNPelSk6P06XoFBzfkYWr0 XhCXgqDP8+Fk4ejc8nvOpUnuo7YmIHdyMX5ISXkFOKA7wPGcw+9PK+JGA0af++Gt BRb2tXNKWPchylWwggNGzHN5uUJovI8MfoGVyX26Ll43ZBUqVDlL9b8AAJn89/Bm +GwGe+XQQuPulADVcDHdJwP+ixzO6/7pIAURfI4edzajjmx1cisk7d6TvX75Q2wl BXpLMl4lYvJNpWVvOX05EjNuk/KNcjREH5p82DvLnLWy/vWZrZRkQEMsex61vngV wzSlpOLdnrrO2bjndWqP8w== 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=fm1; t=1725894401; x= 1725980801; bh=OfLm33DjVhWUXezFEQWTvaXpOVmM98H5Hpm1CfUg2vg=; b=F navrLwHBSFyIbVGAW0WSnoEF+fMHXHyfMaff9FnHaATy5lddn0VI/ubeRVeKPq6S uYNdrzPF23d9+PVqipgOmvfs6nA43aNH1LpSfNaQWvolhGdLTFoAf8iKyzm+H93n vXJ9nmRqF8O8y5HRuhvGUOiXw2HWJW95Ntu934CRf0dsOnAiayFAGU9RZHBnSNHo 1jrwH7vz59/DMnsx7LI4OE6RF9Unv0Aa/KoACdZDk2BFIPThzsDnoH/aZjMc+bNT xFIrq4lP+x3xhqx6WKLyY4DFBsz6gxNr1WfytNMChATI82Aa5GAcKKgP2fqAj+QY TWTyojrmBRK1XtUXCXnhA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeijedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghr uceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrth htvghrnhepffelgeeifefgveduhedthfekuedtffejveegffegjeevtdehgfduieetfeeh jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg gurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghnughrvggrshdrthhhuhgvrh hmrghnnhesshgthhhovghnmhgrtghkvghrshdruggvpdhrtghpthhtohepphhgshhqlhdq ghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Sep 2024 11:06:39 -0400 (EDT) Message-ID: <3cb13eb6-b1fb-4b83-bab5-b03c159b8238@aklaver.com> Date: Mon, 9 Sep 2024 08:06:39 -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 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.thuermann@schoenmackers.de > -- Adrian Klaver adrian.klaver@aklaver.com