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

停止监听时报错:

SNRCTL> stop               
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.197)(PORT=1521)))
TNS-01190: The user is not authorized to execute the requested listener command
LSNRCTL> start
TNS-01106: Listener using listener name LISTENER has already been started
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.197)(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》
中一段官方文档的描述:

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.

我碰到的问题就是当前用户权限不够引起(running as a local administrator),发现切换到root用户一样的错误,直接查看监听文档的权限:

[root@localhost oracle]# ll /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
-rw-r--r--. 1 oracle oinstall 663 Mar  7 07:07 /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora

发现确实是有问题的,修改下权限

[root@localhost oracle]# chmod -R 775 /u01
[root@localhost oracle]# ll /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
-rwxrwxr-x. 1 oracle oinstall 663 Mar  7 07:07 /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora

用root用户停止监听不报错,Oracle用户继续报错,那就是第二个原因了make sure that LSNRCTL is executed with the same OS user credentials as the running listener,当时启动用的用户是root导致的。记得使用统一用户启动和关闭。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值