在为独立服务器安装Grid Infrastructure之后,如何在oracle 11g中重新启动RDBMS的侦听器

时间:2017-10-18 06:49:48

标签: oracle grid listener

我为独立服务器安装了Grid Infrastructure并启用了ASM。因此它有两个 listener.ora ,一个是

%oracle_base%\ product \ 11.2.0 \ grid \ NETWORK \ ADMIN \ listener.ora 和 另一个是 %oracle_home%\ NETWORK \ ADMIN \ listener.ora

我在 %oracle_home%\ NETWORK \ ADMIN \ listener.ora 中定义了 listener_dynamic 。 我的问题是:当我停止RDBMS实例的监听器,然后重新启动它时,它总是说:TNS-01151:在LISTENER.ORA中缺少监听器名称

这是输出:

C:\Users\Administrator>set tns_admin=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN
C:\Users\Administrator>lsnrctl status listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:30:24
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=WIN-P269HP3NG00)(PORT=2521)))
STATUS of the LISTENER
------------------------
Alias                     listener_dynamic
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                18-OCT-2017 11:53:27
Uptime                    0 days 0 hr. 36 min. 57 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         d:\app\administrator\diag\tnslsnr\WIN-P269HP3NG00\listener_dynamic\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-P269HP3NG00)(PORT=2521)))
Services Summary...
Service "asset.xcsc.com" has 1 instance(s).
Instance "asset", status READY, has 1 handler(s) for this service...
Service "assetXDB.xcsc.com" has 1 instance(s).
Instance "asset", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\Users\Administrator>lsnrctl stop listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:31:08
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=WIN-P269HP3NG00)(PORT=2521)))
The command completed successfully
C:\Users\Administrator>lsnrctl start listener_dynamic
LSNRCTL for 64-bitWindows: Version 11.2.0.1.0 -Production on 18-OCT-2017 12:31:26
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Starting tnslsnr: please wait...
Failed to open service <OracleOraCrs11g_home1TNSListenerlistener_dynamic>, error 1060.
TNSLSNR for 64-bitWindows: Version 11.2.0.1.0 -Production
system parameter file is D:\app\Administrator\product\11.2.0\grid\network\admin\listener.ora
Write to d:\app\administrator\product\11.2.0\grid\log\diag\tnslsnr\WIN-P269HP3NG00\listener_dynamic\alert\log.xml log information
TNS-01151:Missing listener name listener_dynamic in LISTENER.ORA
Listener failed to start. See the error message(s) above...

我已指定 tns_admin ,为什么每次都在网格目录中搜索listener.ora?

1 个答案:

答案 0 :(得分:0)

安装网格基础架构时,应使用SRVCTL管理资源。 将ORACLE_HOME设置为您的网格基础结构安装:

srvctl start listener listner -l listener_dynamic

您的所有操作都应该通过srvctl而不是直接进行。如果您没有使用网格基础架构注册您的监听器,则可以使用以下命令:

srvctl add listener -l listener_dynamic