Friday, February 12, 2010

sqlplus / as sysdba, ORA-01031: insufficient privileges

One of the reason of this error is OS user must be belong to "osdba" group defined in group as defined in the "$ORACLE_HOME/rdbms/lib/config.s" or "$ORACLE_HOME/rdbms/lib/config.c". Typically this is set to "dba".
  1. Check your OS user group e.x my group is dbap (not dba)
    %id
    uid=1030(oracle) gid=1030(dbap)
  2. Check if this group is in /etc/group
    cat /etc/groupgrep dbap
  3. Check config.s or config
    cd $ORACLE_HOME/rdbms/lib
    ls -lrt config.*
    cat config.s #It can be also config.c
  4. correct group name in config.s file (example Change both ocurrences of dba to dbap )

    Sun SPARC Solaris
    .ascii "dbap\0"

    IBM AIX/Intel Solaris:
    .string "dbap"
  5. To effect any changes to the groups and to be sure you are using the groups defined in this file relink the Oracle executable.Be sure to shutdown all databases before relinking

    mv config.o config.o.orig
    make -f ins_rdbms.mk ioracle

No comments: