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 - 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 - Production on Mon Sep 5 16:29:57 2011

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

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

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


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
  • Are you logged on as the oracle user in linux?
    – Klas Lindbäck
    Sep 5, 2011 at 7:24
  • yes, i logged on the server computer as oracle user.
    – redhatlinux10
    Sep 5, 2011 at 7:32

4 Answers 4


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


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.


It seems that once the shutdown immediate fails, the connection is dropped, although it doesn't show it. Exiting sqlplus, reconnecting and immediately issuing shutdown abort got things unstuck for me.

From https://community.oracle.com/thread/459659

  • This doesn't answer the question. Mar 15, 2015 at 19:58

I had the same problem of getting an ORA-01031 error when doing a sqlplus / as sysdba. My problem was corrected when I unset the environment variable TWO_TASK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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