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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 710|回复: 0
打印 上一主题 下一主题

[Oracle] Listener Errors TNS-01155 and NL-00305 Using Oracle Gateways

[复制链接]
跳转到指定楼层
楼主
发表于 2025-5-18 11:34:09 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现象:
You are trying to use an Oracle Gateway and get an error on select -


SQL> select * from test_table@gateway_db_link;
ERROR:
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 GATEWAY_DB_LINK

The listener log file will show the errors -



TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in LISTENER.ORA
NL-00305: the specified path name does not exist



原因:
The listener.ora file has an entry which uses 'SERVICE_NAME' instead of 'SID_NAME', for example -



(SID_DESC =
   (SERVICE_NAME = DG4MSQL)
   (ORACLE_HOME = /app/oracle/product/11.1.0/db_1)
)



处理方法:
1.  Either remove the 'SERVICE_NAME' entry or change to a SID_NAME -



(SID_DESC =
   (SID_NAME = DG4MSQL)
   (ORACLE_HOME = /app/oracle/product/11.1.0/db_1)
)

and stop and start the listener.

On some platforms the listener will not start when SERVICE_NAME is used instead of SID_NAME.



2.  This error is also caused by incorrect syntax in the tnsnames.ora file.  For example:

DG4ODBC_12C =
     (DESCRIPTION =
      (ADDRESS_LIST =
       (ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=<port>)
       (CONNECT_DATA=(SID=DG4ODBC12C))
      )
       (HS=OK)
     )

The close parentheses for ADDRESS_LIST is in the incorrect spot. It should be before the CONNECT_DATA portion of the entry.

Since ADDRESS_LIST is not required, remove it:

DG4ODBC_12C =
     (DESCRIPTION =
      (ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=<port>))
      (CONNECT_DATA=(SID=DG4ODBC12C))
      (HS=OK)
     )

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-29 23:48 , Processed in 0.233084 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表