ITPub博客

首页 > 数据库 > Oracle > 再谈ORA-01031 when sqlplus '/as sysdba'

再谈ORA-01031 when sqlplus '/as sysdba'

原创 Oracle 作者:jlttt 时间:2010-08-11 13:22:20 0 删除 编辑

HB-BSS-TEST>sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 11 13:20:04 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

ERROR:
ORA-01031: insufficient privileges

================================

The config.o file may not have been properly generated from the config.s (or config.c) file. There may have been OS user or other changes since the initial install, and hence the ORA-1031 error occurred.


The 'OSDBA' and 'OSOPER' groups are chosen at installation time and usually both default to the group 'dba'.


These groups are compiled into the 'oracle' executable and so are the same for all databases running from a given ORACLE_HOME directory.

Solution

Use the "id" command to see what groups the oracle user belongs to, then check the group in the $ORACLE_HOME/rdbms/lib/config.c (config.s on some OS platforms) to see if they match. If not, then the solution is:

The 'dba' group in the file config.s is set to 'xxx' but your primary group is 'yyy', so to solve the problem, please do the following:

- shutdown all databases running from this home
- cd $ORACLE_HOME/rdbms/lib
- vi config.c

Edit the following lines :

from:

#define SS_DBA_GRP "xxx"
#define SS_OPER_GRP "xxx"


to:

#define SS_DBA_GRP "yyy"
#define SS_OPER_GRP "yyy"


- now remove the existing config.o:

mv config.o config.old

- relink oracle to rebuild config.o and store it inside the oracle executable:

make -f ins_rdbms.mk ioracle

You should now be able to login '/ as sysdba' again.

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9533994/viewspace-1036636/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: resetlogs
请登录后发表评论 登录
全部评论

注册时间:2008-06-28

  • 博文量
    75
  • 访问量
    686125