How to Fix ORA-01031 insufficient privileges - sqlplus / as sysdba
Ok ,ok... here is what took me about 2 hours on my time today.
One colleague of mine cloned an Oracle Home to a new server and passed it to me to create a duplicate oracle database a production database into the new Oracle installed home.
So i am trying to login the empty instance using the sqlplus utility and i get the error:
What the hell .... !!!
All the parameters are set ORACLE_SID, ORACLE_HOME, TNS_ADMIN, etc..
What now ?
First thing i did i have commented the SQLNET.AUTHENTICATION_SERVICES parameter from the sqlnet.ora file but with no success.
Finally after many failed tests and try's i have reached the solution thanks to post on stack page.
So here is the solution:
There is a file in your $ORACLE_HOME/rdbms/lib called config.c. This file holds the os groups that the oracle users is included in.
This groups in my case the dba group was not declared in the config.c file, during the Oracle_Home cloning the groups were not replicated as on the source host.
Here is the content of the file after update:
After you update the config.c file you will need to generate a new config.o file.
make copy of the config.o file before.
Re-link Oracle now
After all this is done try to connect to the instance using the sqlplus
I would recommend you bounce the instance as well.