Tuesday, June 10, 2014

Connection error ORA-01031: insufficient privileges

I just turn on the computer and when trying to connect with oracle with sys user with command "/ as sysdba " it throws error "ORA-01031: insufficient privileges"



What can be problem :
1. Machine user is not associated with the "ora_dba" group.
2. Authentication setting in sqlnet.ora file.

This problem is arise after i recover the database crashed because of control file lost. However this doesn't matter the problem can be face any time.

Resolve the problem:
1. try to login with sys user as /as sysdba

C:\Users\gurjeet>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 10 08:15:35 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


2. First of all we will check the whether the machine user associated with "ora_dba" group or not.
for this (on windows)
move to 
start - control panel - administrative tools(1) - computer management(2) - groups(3) - ora_dba(4) [numbers are counted from below image]




3. After double click on "ora_dba" we can see no machine user is associated with ora_dba group.
So here we need to add the current machine user in this group , For this click on "ADD" button.



4. Type machine user name after click on "check Names" button


5. Apply ok.
  

6. Open cmd and type sqlplus / as sysdba



If still not able to connect with the sys user using command / as sysdba 
It might be problem that you are using wrong  authentication metthod in sqlnet.ora file.

To change the authentication method locate the file "sqlnet.ora" , which will  reside in "$oracle_home/NETWORK/ADMIN.sqlnet,ora" and change the authentication mode from NONE to NTS.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

Related series of post 
authentication method 

SQLNET.AUTHENTICATION_SERVICES

No comments:

Post a Comment

web stats