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

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

转载于:http://blog.itpub.net/9533994/viewspace-1036636/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值