1,问题描述


[oracle@node2 ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-MAY-2019 09:02:03

Copyright (c) 1991, 2013, 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


2,问题解析


[oracle@node2 ~]$  lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-MAY-2019 09:02:55

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 19-MAY-2019 14:34:53
Uptime 0 days 18 hr. 28 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/grid/11.2.0/crs/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/node2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.215)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.217)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "oracle" has 1 instance(s).
Instance "oracle2", status READY, has 1 handler(s) for this service...
Service "oracleXDB" has 1 instance(s).
Instance "oracle2", 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@node2 ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): node2,node1
这个是不用管的


问题描述二

  oracle sqlplus / as sysdba 连接不上去

oracle 错误 TNS-01190与oracle 登入没反应操作_linux

oracle 错误 TNS-01190与oracle 登入没反应操作_当前用户_02

oracle 错误 TNS-01190与oracle 登入没反应操作_oracle_03

oracle 错误 TNS-01190与oracle 登入没反应操作_oracle_04

oracle 死活连接不上去,实例是启动的完好无损,原因是权限不对,

问题解析

  跟据自己的实例分析所有权限:


[root@node2 bin]# cd /u01/app/grid/11.2.0/crs/bin/
[root@node2 bin]# chown grid.oinstall oracle
[root@node2 bin]# chmod +s oracle
[root@node2 bin]# chown root.oinstall oradism
[root@node2 bin]# chmod +s oradism
[root@node2 bin]# chown root.oinstall jssu
[root@node2 bin]# chmod +s jssu
[root@node2 bin]# chown root.oinstall extjob
[root@node2 bin]# chmod +s extjob
[root@node2 bin]# cd /u01/app/oracle/product/11.2.0/db_1/bin/
[oracle@node2 bin]$ chown root.oinstall extjob
[oracle@node2 bin]$ chmod +s extjob
[root@node2 bin]# chown root.oinstall jssu
[root@node2 bin]# chown root.oinstall nmb
[root@node2 bin]# chown root.oinstall nmhs
[root@node2 bin]# chown root.oinstall nmo
[root@node2 bin]# chmod +s nmb
[root@node2 bin]# chmod +s nmhs
[root@node2 bin]# chmod +s nmo
[root@node2 bin]# chmod +s jssu
[root@node2 bin]# chown oracle.asmadmin oracle
[root@node2 bin]# chmod +s oracle
[root@node2 bin]# chown root.oinstall oradism
[root@node2 bin]# chmod +s oradism


具体截图:

oracle 错误 TNS-01190与oracle 登入没反应操作_当前用户_05

 oracle 错误 TNS-01190与oracle 登入没反应操作_oracle_06

权限赋予完整后问题解决,具体权限根据实际情况分析,这里是RAC集群问题