Monday, November 14, 2011

User on Windows ORA-01031 Unable to connect "sys / as sysdba"

User on Windows 2008 
ORA-01031: insufficient privileges while connecting as "sys / as sysdba"

Things are different in windows environment, as a DBA you will encounter it sooner than later


One of them is trying to login to database on a Windows server I wasn't able to connect as sysdba.


On Windows 2008 R2
start--> run--> cmd
opens up command prompt
C:\Users\youruser>sqlplus / as sysdba
You are greeted with ORA-01031: insufficient privileges


Error suggests insufficient privileges, solution--->
Check if the user who is executing this command "sqlplus / as sysdba" is part of ORA_DBA groups.
There are few groups in windows Administrators, ORA_DBA & ORA_OPER, just like we have dba, oper, orainstall.. .etc on unix.
On a side note for installing Oracle you need to be a part of Administartors group.
Groups creation is the responsibility of Administrator


Ok back to the note to avoid this error you have to make sure "youruser" is a part of ORA_DBA group
we will see how this is done
on windows
start--> programs---> administrative tools--> computer management




This will open a console/window
Under computer management-->
select "local users and groups" ---> "groups"---> open "ora_dba "






click the "Add" button






Enter the object name ---> "youruser" ---> check names & then ok
this will add your user to ORA_DBA group


Now you can connect to database as sys / as sysdba
or
Connect to RMAN without error message ORA-01031





No comments:

Post a Comment