所以我试图在同一台服务器中创建 oracle 和 postgresql 之间的数据库链接,当我尝试进行选择时,它显示了这个错误。我一直在不同的论坛中寻找一些答案,但我对它的了解不足并没有让我理解解决问题的方法。这是错误:
ERROR line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Cannot retrieve text from RED / NCR 65535 message
ORA-02063: 2 lines preceding POSTGRESQLLINK
这是我的 tnsnames.ora:
test=(description=
(address_list=
(address=(protocol=TCP)(host=localhost)(port=5432)))
(connect_data=(service_name=test)))
POSTGRESQL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SID = postgresql)
)
(HS = OK)
)
我的 listener.ora:
DEFAULT_SERVICE_LISTENER = XE
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=postgresql)
(ORACLE_HOME=$ORACLE_HOME)
(PROGRAM=dg4odbc)
)
)
我的 odbc.ini:
[sallydb]
Description=PostgreSQL connection to SallyDB
Driver=PostgreSQL
Database=sallydb
Servername=192.168.1.15
UserName=sally
Password=sallypassword
Port=5432
Protocol=9.3
ReadOnly=No
RowVersioning=No
ShowSystemTables=No
ConnSettings=
[test]
Description=PostgreSQL
Driver=PostgreSQL ANSI
Trace=No
TraceFile=/tmp/psqlodbc.log
Database=bahia
Servername=localhost
UserName=postgres
Password=patata
Port=5432
ReadOnly=Yes
RowVersioning=No
ShowSystemTables=No
ShowOidColumn=No
FakeOidIndex=No
ConnSettings=
[PostgreSQL test]
Description=PostgreSQL
Driver=PostgreSQL ANSI
Trace=No
TraceFile=/tmp/psqlodbc.log
Database=template1
Servername=localhost
UserName=
Password=
Port=
ReadOnly=Yes
RowVersioning=No
ShowSystemTables=No
ShowOidColumn=No
FakeOidIndex=No
ConnSettings=
还有我的 odbcinst.ini:
[PostgreSQL ANSI]
Description=PostgreSQL ODBC driver (ANSI version)
Driver=psqlodbca.so
Setup=libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=3
[PostgreSQL Unicode]
Description=PostgreSQL ODBC driver (Unicode version)
Driver=psqlodbcw.so
Setup=libodbcpsqlS.so
Debug=0
CommLog=1
UsageCount=3
对不起,如果这是一个简单的问题。