ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 非oracle用户登陆数据库遭遇ORA-27123错误

非oracle用户登陆数据库遭遇ORA-27123错误

原创 Linux操作系统 作者:lsq_008 时间:2009-03-06 10:20:13 0 删除 编辑

问题描述

以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博客 ” ,链接:http://blog.itpub.net/10972173/viewspace-562996/,如需转载,请注明出处,否则将追究法律责任。

上一篇: sysdba和sysoper
请登录后发表评论 登录
全部评论
十余年大型金融及电信系统数据库管理经验,曾服务于中国建设银行、中国移动。对oracle,mysql数据库有深入了解。 擅长python开发,独立开发了开源数据库自动化监控运维平台Power Monitor。

注册时间:2008-02-29

  • 博文量
    325
  • 访问量
    1238627