I've been trying to use oracle to create a database that can dblink to PG, after installing the unixODBC and PostgreSQL ODBC drivers successfully, I configured odbcinst.ini and odbc.ini respectively, and I can connect to the database normally with isql -v PG,
Then go to Oracle to configure the transparent gateway, and configure $ORACLE_HOME/netword/admin/tns*.ora
$ORACLE_HOME/netword/admin/lisen*.ora
$ORACLE_HOME/hs/admin/init<SID>.ora
Then using tnsping PG can access the pass normally, but after I create dblink,
create database link to_pg connect to "postgres" identified by "password" using 'PG';
select t.* from postgres.pg_stat_activity@to_pg t where t.state='active';
The following error is reported when querying the table of the PG library, please help me see what is going on:
Oracle Corporation --- WEDNESDAY DEC 04 2024 18:49:36.080
Heterogeneous Agent Release
11.2.0.4.0
Oracle Corporation --- WEDNESDAY DEC 04 2024 18:49:36.080
Version 11.2.0.4.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "3"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
HOSGIP returned value of "UCS2" for HS_NLS_NCHAR
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
setting HS_FDS_QUOTE_IDENTIFIER to default of "TRUE"
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "PGINSTANCE"
Product-Info:
Port Rls/Upd:4/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.4.0_0019, Instance:PGINSTANCE
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=1000
HOCXU_DB_CSET=873
HS_LANGUAGE is AMERICAN_AMERICA.AL32UTF8
LANG=zh_CN.UTF-8
HOCXU_SEM_VER=112000
Entered hgolofn at 2024/12/04-18:49:36
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/psqlodbcw.so"
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c3df0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60bf8f0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c27c0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60bf980
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c14b0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60bffc0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c4170
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0110
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c01e0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c4360
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c02c0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0370
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c4590
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0400
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c1a90
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0600
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0660
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c0750
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c07c0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c4870
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c4830
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c95d0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c9a80
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c9c80
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60ca1b0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c9dc0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60ca400
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60cb0a0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c8fd0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
symbol_peflctx=0xa60c91f0
hoaerr:0
Exiting hgolofns at 2024/12/04-18:49:36
Entered hgolofns at 2024/12/04-18:49:36
hoaerr:28500
Exiting hgolofns at 2024/12/04-18:49:36
Failed to load ODBC library symbol: /usr/lib64/psqlodbcw.so(SQLGetDescRecW)
Exiting hgolofn, rc=28500 at 2024/12/04-18:49:36
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:424 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:113 FUNCTION:hgoexit() ID:Connection context