问题描述:
以oracle用户登陆操作系统后,再登陆数据库,可以正常登陆:
-bash-3.00$ id
uid=500(oracle) gid=501(dba) groups=501(dba) context=user_u:system_r:unconfined_t
-bash-3.00$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Mar 6 10:15:07 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Data Mining and Real Application Testing options
如果以用户test登陆操作系统后,再登陆数据库,登陆失败:
-bash-3.00$ id
uid=502(test) gid=501(dba) groups=501(dba) context=user_u:system_r:unconfined_t
-bash-3.00$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Mar 6 10:14:36 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux Error: 13: Permission denied
用户test已经被加入到dba组,为什么会提示这个错误呢?
问题解决:
查了一下metalink,有如下解释:
ORA-27123 When Connecting As Non Oracle User
fact: UNIX based systems
fact: Oracle Server - Enterprise Edition 8.1
fact: User is not the oracle software owner
symptom: ORA-27123: unable to attach to shared memory segment
cause: SEMMNS and SEMMSL are set correct but the user is not
allowed to attach the shared memory because of insufficient privileges.
Perhaps during installation root.sh has not been executed.
Permissions of oracle binary have not set with sticky bit.
fix:
Set sticky bit for oracle binary.
Do the following as owner of the oracle software:
chmod 6755 $ORACLE_HOME/bin/oracle
按照metalink的提示进行权限修改:
-bash-3.00$ id
uid=502(test) gid=501(dba) groups=501(dba) context=user_u:system_r:unconfined_t
-bash-3.00$ chmod 6755 $ORACLE_HOME/bin/oracle
-bash-3.00$ su - test
Password:
-bash-3.00$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Mar 6 10:18:28 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Data Mining and Real Application Testing options
SQL>
修改权限后,确认可以正常登陆。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10972173/viewspace-562996/ ,如需转载,请注明出处,否则将追究法律责任。