Welcome 微信登录

首页 / 数据库 / MySQL / TNS-01190 错误解决方法

由于监听程序原来是使用的是端口1532.现在修改成1521,结果不能启动说监听已经启动了.于是停止监听报错
 TNS-01190: The user is not authorized to execute the requested listener command
 [Oracle@linuxidc admin]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-JUL-2014 11:23:07Copyright (c) 1991, 2009, Oracle.  All rights reserved.TNS-01106: Listener using listener name LISTENER has already been started[oracle@linuxidc admin]$ lsnrctl stopLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-JUL-2014 11:23:24Copyright (c) 1991, 2009, Oracle.  All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxidc)(PORT=1521)))
TNS-01190: The user is not authorized to execute the requested listener command
 
查看监听状态:
[grid@linuxidc ~]$ ps -ef | grep -i listener
grid      4180   1  0 11:28 ?        00:00:00 /grid/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid      4517  4138  0 11:56 pts/1    00:00:00 grep -i listener
[oracle@linuxidc ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-JUL-2014 11:24:25Copyright (c) 1991, 2009, Oracle.  All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxidc)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                   LISTENER
Version                 TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                03-JUL-2014 10:40:26
Uptime                    0 days 0 hr. 43 min. 59 sec
Trace Level             off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File /grid/11.2.0/grid/network/admin/listener.ora
Listener Log File       /grid/11.2.0/grid/log/diag/tnslsnr/linuxidc/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxidc)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "jycs" has 1 instance(s).
  Instance "jycs", status READY, has 1 handler(s) for this service...
Service "jycs (ORACLE_HOME =/u01/app/oracle/11.2.0/db" has 1 instance(s).
  Instance "jycs", status UNKNOWN, has 1 handler(s) for this service...
Service "jycsXDB" has 1 instance(s).
  Instance "jycs", status READY, has 1 handler(s) for this service...
The command completed successfully
 
其中:Security ON: Local OS Authentication 此条提示信息表明监听处于Local OS Authentication认证模式.Oracle 10g版本以及之后的版本中推出了监听的本地操作系统认证安全特性.若监听程序是在当前用户下启动的,则当前用户具有管理监听的所有权利,其他用户对监听的管理将受到限制
 
因为数据库是11.2.0.1而且使用了oracle restart特性且用户为grid.注册了listener服务且只对默认端口1521有效.之前是1532所以oracle restart不会自动重启监听.由于将端口修改成了1521所以oracle restart自动重启了listener
 [grid@linuxidc ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): linuxidc
 
由于Oracle restart 以grid用户自动启动了监听所以oracle用户不能重动由grid用户所启动的监听。--------------------------------------------------------------------------------Linux-6-64下安装Oracle 12C笔记 http://www.linuxidc.com/Linux/2013-07/86805.htm在CentOS 6.4下安装Oracle 11gR2(x64) http://www.linuxidc.com/Linux/2014-02/97374.htmOracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htmDebian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htm--------------------------------------------------------------------------------更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址