ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

TNS-01190: The user is not authorized to execute the requested listener command

2021-04-11 12:52:03  阅读:220  来源: 互联网

标签:requested execute TNS listener Oracle grid user DEVEDW oracle


2014.9.25 11:33

开发的请求在重启测试环境的的库,秉着重启数据库的官方标准
1、关闭监听
2、关闭数据库
3、打开数据库
4、开启监听
一般都是Oracle用户去操作这些。但是在lsnrctl stop 时报错:

[oracle@DEVEDW ~]$ lsnrctl stop 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-SEP-2014 11:22:46

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-01190: The user is not authorized to execute the requested listener command

官方文档的描述:

TNS-01190: The user is not authorized to execute the requested listener command  

Cause:    Most of the listener administrative commands are only intended to be issued by privileged users, for example DBAs or system administrators. If the listener password is not set, then the listener only accepts administrative requests from LSNRCTL running with the same OS credentials, or running as a local administrator (also referred to as super user).

Action:    If an authorized user is attempting the command, then make sure that LSNRCTL is executed with the same OS user credentials as the running listener, or as a local administrator.  
大概意思就是确定执行操作的用户是不是DBA或者管理员,说白了就是有木有权限来执行。  
网上找了一下发现有如下情况:  
1、权限问题  
2、修改过端口  

解决方案:  
第一种情况:  
授予Oracle用户权限即可  
chown -R oracle.oinstall / ----------》安装目录 ORACLE_HOME  
chmod -R 775 /   为了安全,只要给到可以启动即可。  

第二种情况:  
因为数据库是11.2.0.3而且使用了oracle restart特性且用户为grid.注册了listener服务且只对默认端口1521有效.之前是1522所以oracle restart不会自动重启监听.由于将端口修改成了1521所以oracle restart自动重启了listener  
 [grid@DEVEDW~]$ srvctl status listener  
Listener LISTENER is enabled  
Listener LISTENER is running on node(s): DEVEDW      
由于Oracle restart 以grid用户自动启动了监听所以oracle用户不能重动由grid用户所启动的监听。
故可以切换到grid 用户去执行lsnrctl 操作
 

[oracle@DEVEDW home]$ su - grid
Password:
[grid@DEVEDW ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 25-SEP-2014 11:24:49

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully





标签:requested,execute,TNS,listener,Oracle,grid,user,DEVEDW,oracle
来源: https://blog.51cto.com/lhrbest/2698821

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有