Yesterday i ran into a server which did not allow to connect with “sqlplus / as sysdba” ( or sqlplus “/as sysdba”) but would allow sqlplus sys as sysdba.
I needed the server to allow this as scripts are using this connect method to execute nightly database operations.
[DXP01] xxx:admin> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 – Production on Wed Jul 7 20:45:54 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privilegesEnter user-name:
After recreating the passwd files by using
orapwd file=$ORACLE_HOME/dbs/orapwDXP01 password=manager entries=5
And double checking the group membership of oracle were the users oracle should be part of the group “dba”.
[DXP01] xxx:admin> id
uid=1000(oracle) gid=1000(oinstall) groups=1000(oinstall),1001(dba)
I found myself with an SQLNET.ORA which causes this behaviour.
SQLNET.AUTHENTICATION_SERVICES=(NTS)
After commenting out this line i was able to connect as sysdba again.
[DXP01] xxx:admin> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 – Production on Wed Jul 7 20:57:05 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production
With the Partitioning, OLAP and Data Mining optionsSQL>