Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6ysg-0004FS-80 for pgsql-admin@arkaria.postgresql.org; Fri, 23 Jul 2021 17:22:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6ysf-0004oX-7I for pgsql-admin@arkaria.postgresql.org; Fri, 23 Jul 2021 17:22:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6yse-0004oP-UW for pgsql-admin@lists.postgresql.org; Fri, 23 Jul 2021 17:22:36 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6ysa-0003yU-GR for pgsql-admin@lists.postgresql.org; Fri, 23 Jul 2021 17:22:35 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m6ysZ-0001UB-36; Fri, 23 Jul 2021 13:22:31 -0400 Date: Fri, 23 Jul 2021 13:22:31 -0400 From: Bruce Momjian To: karen.smalara@boehringer-ingelheim.com Cc: pgsql-admin@lists.postgresql.org Subject: Re: Call to package procedure in Oracle not working Message-ID: <20210723172231.GA8026@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I think you are using EDB's Advanced Server product, and therefore need to contact them for help on this. --------------------------------------------------------------------------- On Fri, Jul 23, 2021 at 05:06:47PM +0000, karen.smalara@boehringer-ingelheim.com wrote: > We have migrated from Oracle to PostgreSQL and one thing could only be tested > in Production and of course it is not working so I am desperate for a solution. > > > > > > In Oracle (it works here), we had a database link and a synonym to a subroutine > in the foreign table package: > > ● DBLINK to another Oracle database: REMP_MSS > ● Package name in REMP_MSS: REMP_API CREATE OR REPLACE SYNONYM > "PGXLIMSP"."REMPASS_API" FOR "REMPASS_API"@"REMP_MSS” > ● SYNONYM: CREATE OR REPLACE SYNONYM "PGXLIMSP"."REMPASS_API" FOR > "REMPASS_API"@"REMP_MSS"; > ● Call from an Oracle procedure rempass_api.put_line(0,''); > > > > This is what we have in POSTGRESQL: > > ● Using oci_dblink, a foreign server named REMP_MSS, this link works because > we can query tables in this database > ● SYNONYM: CREATE OR REPLACE SYNONYM "PGXLIMSV8"."REMPASS_API" FOR > "REMPASS_API"@"REMP_MSS” > ● Call from Oracle procedure rempass_api.put_line(0,' '); but get the error > message “schema REMPASS_API@REMP_MSS does not exist” > > > > In the Oracle database this is the package that has the put_line subroutine > > [cid] > > We gave tried several variations of the call but all error out with “schema xyz > does not exist”: > > ● CALL "REMPASS_API@REMP_MSS".put_line(0,''); > ● CALL "MSS.REMPASS_API@REMP_MSS ".put_line(0,''); > ● CALL "MSS.REMPASS_API@REMP_MSS ".put_line(0,''); > ● CALL "rempass_api@remp_mss".put_line(0,''); > > > > Can anyone help? > > > > Best Regards, > > Karen > > [cid] Karen Smalara > > Senior Principal Software Engineer > > Boehringer Ingelheim Pharmaceuticals, Inc. > > 900 Ridgebury Road, Ridgefield, CT 06877 > > C: +1 804 244 0111 > > karen.smalara@boehringer-ingelheim.com > > Facebook | Twitter | Instagram | LinkedIn > > > > > > > > > This e-mail is confidential and may also be legally privileged. If you are not > the intended recipient please reply to sender, delete the e-mail and do not > disclose its contents to any person. Any unauthorized review, use, disclosure, > copying or distribution is strictly prohibited. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.