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

jlttt發表於2010-08-11

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章