oracle:ora-12516:因为可执行文件"oracle"的组s权限丢失引起的问题
问题的环境:
centos7.9 上安装在2个独立linux用户下的 oracle 11.2.0.4
2个独立linux用户分别是 oracle(oracle组)、oracle11g(oracle11g组)
现在,只在oracle用户下启动监听,可以发现2个用户下的实例都可以成功注册到监听中
but
属于oracle11g的service_names,根本无法从远程访问!!!
问题(故障现象):
E:\instantclient_11_2_0_4_0_x64>sqlplus sys/sys@192.168.75.157:1521/test as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jan 25 16:24:43 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12537: TNS:connection closed
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
##########################
[oracle11g@localhost admin]$ oerr ora 12516
12516, 00000, "TNS:listener could not find available handler with matching protocol stack"
// *Cause: None of the known and available service handlers for the given
// SERVICE_NAME support the client's protocol stack: transport, session,
// and presentation protocols.
// *Action: Check to make sure that the service handlers (e.g. dispatchers)
// for the given SERVICE_NAME are registered with the listener, are accepting
// connections, and that they are properly configured to support the desired
// protocols.
[oracle11g@localhost admin]$
分析过程:
从Oracle自己的文档内只是大概知道是tns协议、端口、甚至oracle服务器的会话数可能出问题了。
网上的资料也都是这几方面的内容。
但对于我的环境来说仍然无法解决问题。
最后,无奈,通过strace分析比较各自报错,并逐一分析关键文件的权限,终于发现问题
解决:
${ORACLE_HOME}/bin/oracle的权限 应该是【-rwsr-sr--x】,而有问题的oracle11g用户下的该文件权限是【-rwxr-xr--x】、或【-rwsr-x--x】
一个“s”之差!!!
修改为正确的权限,问题解决。
更进一步的结论:
linux下,不同oracle实例既可以使用同一个os的用户、也可以使用不同的os用户,甚至不同的os用户可以使用不同的os组。
你只要保证,启动listener的os用户可以访问到其他os用户的oracle安装实例的二进制文件“bin/oracle”的权限设置正确:即,合理设置了s权限。
linux的s权限知识:
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示
2010-01-25 Linux:计划任务之at
2010-01-25 Linux:计划任务之cron
2010-01-25 Linux:和任务执行相关的 【批命令执行 run-parts】命令