相关文章推荐
傲视众生的枇杷  ·  DoCmd.OpenForm ...·  2 月前    · 

Error ORA-12546 when trying to access to a remote Oracle database #409

@plu9in

Description

Hi Laurenz,

I know that this error is common but I did not find any solution.

My distribution is a CentOS 8 - 64bits and my database is a postgresql 10.6.

I have installed the oracle client and I have no problem to connect via sqlplus with the following command

$ sqlplus user/password@ORCL_PRD

or with

$ sqlplus user/password@\\192.168.x.x:53000\ORCL

Both connections work fine. Mind that the Oracle database is not listing on the regular port but on 53000.

Then, I have compiled and installed your foreign data wrapper.

select oracle_diag();
=> oracle_fdw 2.2.0, PostgreSQL 10.6, Oracle, ORACLE_HOME=/usr/lib/oracle/19.6/client64
set client_min_messages=debug1;
=> SET
select oracle_diag('oracle');
=> DEBUG: oracle_fdw: set NLS_LANG=FRENCH_FRANCE.AL32UTF8
     ERROR: ERREUR: cannot connect to foreign Oracle server
     DETAIL: ORA-12546: TNS : permission denied.

Maybe the problem is that the Oracle database is on a Windows system and the Postgresql database is on a CentOS.
Any idea of what can go wrong ?