Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database wont start up -- getting ORA-01031 error

Status
Not open for further replies.

toddyl

Technical User
Sep 26, 2005
102
US
Hi,

I had a database running on HP-UX that was working fine up until this morning. I logged in as sysdba and shut it down. Later I went to start it up again but when I did:

sqlplus /nolog
connect sys/mypassword as sysdba

I got the error ORA-01031 -- insufficient privileges.

I did not change anything related to oracle so I cannot understand why I cannot log back in as sys and start the system.

If I try logging in as a different user I get:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HP-UX Error: 2: No such file or directory

Anyone any idea why I cannot start up my system and how I can do so?

Thanks,

toddyl
 
Oh, and check the $ORACLE_SID and $ORACLE_HOME variables are set appropriately.
 
Checked env variables

$ echo $ORACLE_HOME
/home/oracle/OraHome9i
$ echo $ORACLE_SID
RRSUPP

when I do my sqlplus "/ as sysdba" I'm still getting the insufficient privileges error.
 
Yes listener running and can tnsping database.
 
Not sure.

oracle is in its own group, no other sign of any other users in this group.
 
What is the user oracle entry in /etc/passwd and the dba group in /etc/group (grep oracle /etc/passwd, grep dba /etc/group)? As far as I know, user oracle should have a primary group of dba.
 
# grep oracle /etc/passwd
oracle:ME9cFlG8sJAzc:103:20:,,,:/home/oracle:/usr/bin/ksh

# grep dba /etc/group
dba::103:
 
Looks OK. Is TWO_TASK set (echo $TWO_TASK)? If so issue unset TWO_TASK and try to connect again.
 
Ken,
not sure if this looks ok ?
To me it seems that oracle has userid=103, groupid=20
But shouldn't it be groupid=103 ?
Or am I missing something?

toddyl,
any chance that somebody changed oracle's group from 103(dba) to 20(users) ?
 
toddyl,
one more test:
When you are logged in as oracle, what is the output of id command?
 
Output of id is:

bash-2.05a$ id
uid=103(oracle) gid=20(users)

Not sure if anyone has changed it or not.
Is there anyway to check?

How can I change it back if necessary?
 
You can change it by editing (using vi, say) the entry in /etc/passwd, to change the 20 to 103. Then log back in as oracle and try connecting again.
 
If you're not happy editing the file directly, I imagine you can use SAM to update the oracle user's group.

I think I'd also be asking questions of colleagues who might have changed such a fundamental user's environment!
 
I've changed that but am still getting the same problem.
 
Can you give the output of another id command as user oracle and the output of echo $TWO_TASK
 
Managed to get it working.

Looked around at various sites and found one with a similar issue which said to set

SQLNET.AUTHENTICATION_SERVICES= (ALL)

I had this set to NONE.

I've managed to log in and get things started again.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top