重庆思庄Oracle、、PostgreSQL、Redhat认证学习论坛

标题: Listener Error TNS-12518 And User Error ORA-28545 Using DG4MSQL 11g on Windows [打印本页]

作者: 刘泽宇    时间: 3 天前
标题: Listener Error TNS-12518 And User Error ORA-28545 Using DG4MSQL 11g on Windows
现象:
You are using DG4MSQL to connect to SQL*Server and a connection gives the following error -


SQL> select * from emp@testlink;
select * from emp@testlink
*
Error at line1:
ORA-28545: error diagnosed by Net8 when connecting to an agent.
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from TESTLINK.

A listener log file shows the following errors -

TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
32-bit Windows Error: 2: No such file or directory



原因:
The cause of this problem is that there is an ORACLE_HOME environment variable in the session starting the listener that is pointing to a 10.2 ORACLE_HOME . This is preventing the 11g listener finding the gateway executable file in the 11g directory.

The problem can be fixed by adding the full path name of the gateway executable to the listener.ora -

(PROGRAM=C:\OracleGateways\bin\dg4msql)

which allows the gateway connection to work. However, this is not the best solution for this problem as there may be future installs of other versions which will also have the same problem.

This error can also happen if the listener being used for the Gateway is in a different ORACLE_HOME from where the Gateway is installed.

For example,  the listener being used for the Gateway is run from the directory -

D:\oracle\product\12.1.0\dbhome_1\network\admin

but the Gateway is installed in -

d:\app\oracle\product\12.1.0\tghome_3



处理方法:
For the first cause the solution is -
The permanent and correct solution for this problem to prevent future problems with other Oracle version installs is to remove any ORACLE_HOME environment variable settings from the session starting the 11g listener.
The ORACLE_HOME parameter is not required on Windows operating systems.

When the Gateway is in a different ORACLE_HOME from the listener ORACLE_HOME then the solution is to create and use a listener from the Gateway ORACLE_HOME -

d:\app\oracle\product\12.1.0\tghome_3\network\admin






欢迎光临 重庆思庄Oracle、、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2