Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Oracle returns an error "ORA-01031: insufficient privileges" When I run sqlplus / as sysdba but sqlplus sys/oracle123 as sysdba doesn't, why?

  • Oracle version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
  • Linux version: SUSE Linux Enterprise Server 11 (x86_64)

I know that Oracle uses OS authentication when running sqlplus / as sysdba, I also checked sqlnet.ora carefully and it contains SQLNET.AUTHENTICATION_SERVICES = (NTS).

I also changed the oracle user's group, oracle user absolutely belongs to dba group because when I run command id the following information returns:

oracle@linux-mage:~> id
uid=103(oracle) gid=106(dba) groups=105(oinstall),106(dba)

Another information is I can logged on through sqlplus sys/oracle123 as sysdba, but I can not shutdown the instance:

oracle@linux-mage:~> sqlplus sys/oracle123 as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 5 16:29:57 2011

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

Connected.
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-27140: attach to post/wait facility failed
SQL> shutdown abort
ORA-01031: insufficient privileges
SQL>

i ran strace -o trace.out sqlplus "/ as sysdba" and get the following output message. the strace message is too big. so i paste it into pastebin. please visit this link

http://pastebin.com/YpjVeG8u

ipcs -s and ipcs -ls information:
oracle@linux-mage:~> ipcs -s

------ Semaphore Arrays --------
key        semid      owner      perms      nsems

oracle@linux-mage:~> ipcs -ls

------ Semaphore Limits --------
max number of arrays = 200
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767
share|improve this question

migrated from stackoverflow.com Sep 5 '11 at 10:09

This question came from our site for professional and enthusiast programmers.

    
Are you logged on as the oracle user in linux? –  Klas Lindbäck Sep 5 '11 at 7:24
    
yes, i logged on the server computer as oracle user. –  redhatlinux10 Sep 5 '11 at 7:32
add comment

3 Answers 3

Something must have gone wrong at the O/S level - check this page for some steps to track down the problem

share|improve this answer
    
thanks for Jack Douglas. i followed the page link and try these 5 steps one by one but unfortunately it didn't solve my problem. the following is strace's output. would you please analysis it for me? <br/> command :strace -o trace.out sqlplus "/ as sysdba" <br/> –  redhatlinux10 Sep 7 '11 at 7:20
    
@redhat comments don't accept HTML - why not edit your question with the new info? –  Jack Douglas Sep 7 '11 at 7:25
    
my question has been updated with strace information. waiting for your reply. thanks! –  redhatlinux10 Sep 7 '11 at 7:48
add comment
cat $ORACLE_HOME/network/admin/sqlnet.ora

echo $ORACLE_SID

ls -l $ORACLE_HOME/dbs/orapw*
share|improve this answer
1  
Hi @Maclean and welcome to Database Administrators ... can I encourage you to provide a tad more explanation in there to help further visitors to understand how this works, etc. Also, I've edited to make it have "code formatting" ;) –  jcolebrand Sep 6 '11 at 1:48
add comment

Post/wait is the semaphore IPC subsystem - it is likely that either you have run out of semaphores, or the semaphores have been created with permissions that don't permit your user to access them - check the output of ipcs -s, where are the permissions there? Compare the number of semaphores to ipcs -ls.

share|improve this answer
    
ipcs -s : oracle@linux-mage:~> ipcs -s ------ Semaphore Arrays -------- key semid owner perms nsems ipcs -ls : oracle@linux-mage:~> ipcs -ls ------ Semaphore Limits -------- max number of arrays = 200 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 100 semaphore max value = 32767 –  redhatlinux10 Sep 8 '11 at 0:48
    
ipcs -s and ipcs -ls have been added in my post. there seems be no problem. –  redhatlinux10 Sep 8 '11 at 0:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.