2

Oracleからこのクエリを試してみます:

select * from "a_table"@Postgres;

これが私が得るエラーメッセージです:

ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: précédant 2 lines de RECORD
28545. 0000 -  "error diagnosed by Net8 when connecting to an agent"
*Cause:    An attempt to call an external procedure or to issue SQL
       to a non-Oracle system on a Heterogeneous Services database link
       failed at connection initialization.  The error diagnosed
       by Net8 NCR software is reported separately.
*Action:   Refer to the Net8 NCRO error message.  If this isn't clear,
       check connection administrative setup in tnsnames.ora
       and listener.ora for the service associated with the
       Heterogeneous Services database link being used, or with
       'extproc_connection_data' for an external procedure call.
Erreur à la ligne 1, colonne 25

これがtnsnames.oraです

Postgres =
   (DESCRIPTION =
     (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
   )
   (CONNECT_DATA =
     (SID = RECORD)
   )
   (HS=OK)
  )

これがlistener.oraです

LISTENER_HS =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1525))
        (ADDRESS = (PROTOCOL = IPC)(KEY = PNPKEY))
      )
    )
  )

SID_LIST_LISTENER_HS =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = RECORD)
      (ORACLE_HOME = /oracle/product/10.2.0)
      (PROGRAM = hsodbc)
      (ENVS = "LD_LIBRARY_PATH=/oracle/product/10.2.0/lib32:/oracle/product/10.2.0/hs/lib32:/user/lib")
    )
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /oracle/product/10.2.0)
      (PROGRAM = extproc)
    )
  )

リスナーを起動した後、ここに出力があることに注意してください

$ lsnrctl status LISTENER_HS

LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 22-FEB-2012 13:45:09

Copyright (c) 1991, 2006, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1525)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_HS
Version                   TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date                22-FEB-2012 13:45:05
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /oracle/product/10.2.0/network/admin/listener.ora
Listener Log File         /oracle/product/10.2.0/network/log/listener_hs.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1525)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "RECORD" has 1 instance(s).
  Instance "RECORD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

ここでinitPostgres.ora

HS_FDS_CONNECT_INFO = Postgres
HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_TRACE_FILE_NAME = /oracle/product/10.2.0/hs/log/postgres.trc
HS_FDS_SHAREABLE_NAME = /usr/lib/psqlodbc.so

set ODBCINI= /etc/odbc.ini

/oracle/product/10.2.0/hs/log/record.trc空です。

私は何が欠けていますか?

Oracle 10gR2
LinuxRedHat64ビット

Postgresql8.3LinuxRedHat64
ビット

編集: ODBCドライバーが稼働していることを手動で確認しようとすると、次のようになります。

$ isql postgres USER PASS -v
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/psqlodbc.so' : /usr/lib/psqlodbc.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou répertoire de ce type
[ISQL]ERROR: Could not SQLConnect
4

1 に答える 1

2

Oracleフォーラムで同じ質問をしましたが、応答があります。

簡単に言うと、Linux64ビットでは使用できませんhsodbc。Linux32ビットからのポートはありません。代わりに、DG4ODBCOracle10.2.0.3との非互換性を使用する必要があります。次に、私の選択肢は次のいずれかです。

  • ODBC11.2.0.3用のデータベースゲートウェイをインストールします
  • Oracle10.2.0.3からOracle10.2.0.4以降に移行する
  • またはパッチ5965763を適用します

詳細な回答はこちらです。

于 2012-02-22T17:27:50.343 に答える