1 2 Previous Next 16 Replies Latest reply: Feb 13, 2013 5:56 PM by asahide RSS

    insufficient privilege to connect my DB

    972355
      Good Morning Experts ;

      My DB was working fine. I deleted dba group
      now i can't connect my DB. Please help me.

      GROUP DBA REMOVED
      # groupdel dba

      TRYING TO CONNECT  TO MY DB

      su - oracle
      +$ export ORACLE_SID=testdb+
      +$ sqlplus /nolog+

      SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 14 03:58:20 2013
      Copyright (c) 1982, 2005, Oracle.  All rights reserved.

      SQL> conn /as sysdba
      ERROR:
      ORA-01031: insufficient privileges

      AGAIN dba Group added as secondery

      # groupadd dba
      # useradd -G dba oracle
      useradd: user oracle exists

      STILL NOT ABLE TO CONNECT MY DB

      +# su - oracle+
      +$ export ORACLE_SID=testdb+
      +$ sqlplus /nolog+

      SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 14 04:01:32 2013
      Copyright (c) 1982, 2005, Oracle.  All rights reserved.

      SQL> conn /as sysdba
      ERROR:
      ORA-01031: insufficient privileges
        • 1. Re: insufficient privilege to connect my DB
          972355
          $ id
          uid=502(oracle) gid=502(oinstall) groups=502(oinstall)

          Why dba not added ?
          • 2. Re: insufficient privilege to connect my DB
            Richard Harrison .
            Hi,
            You need to add the dba group back with the same gid it had before. Or there is a file somewhere which contains the gid that has dba rights. Can't remember the name of it an no access to check. You can update that and then relink.

            Cheers,
            Harry
            • 3. Re: insufficient privilege to connect my DB
              TSharma-Oracle
              The 'DBA' and 'OSOPER' groups are chosen at installation time and usually both default
              to the group 'dba'. These groups are compiled into the 'oracle' executable and so are the
              same for all databases running from a given ORACLE_HOME directory.
              Deletion of DBA group could corrupt "config" file in $ORACLE_HOME/rdbms/lib.
              Solution is to remove old corrupted CONFIG.O and relink oracle

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

              You can find full details in the following article : ID 435947.1

              Try also recreating a password file, see if that could fix teh issue first.
              • 4. Re: insufficient privilege to connect my DB
                972355
                Hi T.Sharma ,  please see here :

                $ v config.o config.o orig
                mv: when moving multiple files, last argument must be a directory

                $ mv config.o config.o.orig
                mv: cannot stat `config.o': No such file or directory

                $ make -f ins_rdbms.mkioracle
                make: ins_rdbms.mkioracle: No such file or directory
                make: *** No rule to make target `ins_rdbms.mkioracle'. Stop.

                Hi harry ;

                groupadd -g 503 dba
                # useradd -G dba oracle
                useradd: user oracle exists
                # su - oracle
                $ id
                uid=502(oracle) gid=502(oinstall) groups=502(oinstall)
                • 5. Re: insufficient privilege to connect my DB
                  asahide
                  Hi,
                  $ mv config.o config.o.orig
                  mv: cannot stat `config.o': No such file or directory
                  where is your current directory?
                  here?
                  cd $ORACLE_HOME/rdbms/lib
                  $ make -f ins_rdbms.mkioracle
                  make: ins_rdbms.mkioracle: No such file or director
                  Input SPACE between ins_rdbms.mk and ioracle.
                  make -f ins_rdbms.mk ioracle
                  • 6. Re: insufficient privilege to connect my DB
                    972355
                    *$ mv config.o config.o.orig*
                    *$ make -f ins_rdbms.mk ioracle*

                    chmod 755 /u01/app/oracle/product/10.2.0/db_1/bin
                    - Linking Oracle
                    rm -f /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle
                    gcc  -o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle -L/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc   -Wl,-E `test -f /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o && echo /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o` /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/opimai.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ssoraed.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ttcsoi.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/defopt.o  -Wl,--whole-archive -lperfsrv10 -Wl,--no-whole-archive /u01/app/oracle/product/10.2.0/db_1/lib/nautab.o /u01/app/oracle/product/10.2.0/db_1/lib/naeet.o /u01/app/oracle/product/10.2.0/db_1/lib/naect.o /u01/app/oracle/product/10.2.0/db_1/lib/naedhs.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/config.o  -lserver10 -lodm10 -lnnet10 -lskgxp10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lhasgen10 -lcore10 -lskgxn2 -locr10 -locrb10 -locrutl10 -lhasgen10 -lcore10 -lskgxn2   -lclient10  -lvsn10 -lcommon10 -lgeneric10 -lknlopt `if /usr/bin/ar tv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap10" ; fi` -lslax10 -lpls10  -lplp10 -lserver10 -lclient10  -lvsn10 -lcommon10 -lgeneric10 -lknlopt -lslax10 -lpls10  -lplp10 -ljox10 -lserver10 -lclsra10 -ldbcfg10 -locijdbcst10 -lwwg  `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `if /usr/bin/ar tv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo10"; fi` -lctxc10 -lctx10 -lzx10 -lgx10 -lctx10 -lzx10 -lgx10 -lordimt10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lsnls10 -lunls10  -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -laio    `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib -lm    `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/10.2.0/db_1/lib
                    +/u01/app/oracle/product/10.2.0/db_1/lib//libcore10.a(lcd.o)(.text+0x8e8): In function `lcdprm':+
                    +: warning: the `gets' function is dangerous and should not be used.+
                    mv -f /u01/app/oracle/product/10.2.0/db_1/bin/oracle /u01/app/oracle/product/10.2.0/db_1/bin/oracleO
                    mv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/oracle /u01/app/oracle/product/10.2.0/db_1/bin/oracle
                    chmod 6751 /u01/app/oracle/product/10.2.0/db_1/bin/oracle

                    +$ cd+
                    +$ export ORACLE_SID=testdb+
                    +$ sqlplus /nolog+
                    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 14 04:44:50 2013
                    Copyright (c) 1982, 2005, Oracle.  All rights reserved.

                    SQL> conn /as sysdba
                    ERROR:
                    ORA-01031: insufficient privileges


                    SQL> !
                    +$ id+
                    uid=502(oracle) gid=502(oinstall) groups=502(oinstall)
                    +$ su -+
                    Password:
                    +# groupdel dba+
                    +# groupadd -g 503 dba+
                    +[root@linuxserver ~]# useradd -G dba oracle+
                    useradd: user oracle exists
                    +# su - oracle+
                    +$ id+
                    uid=502(oracle) gid=502(oinstall) groups=502(oinstall)
                    • 7. Re: insufficient privilege to connect my DB
                      asahide
                      Hi,

                      Can you show us your config.c or config.s file?
                      And first, You have to add dba group before make.

                      Regards,
                      • 8. Re: insufficient privilege to connect my DB
                        972355
                        config.c

                        * SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access. */
                        /* Refer to the Installation and User's Guide for further information. */

                        #define SS_DBA_GRP "dba"
                        #define SS_OPER_GRP "dba"

                        char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP};
                        ~

                        There is no file "config.s" under $ORACLE_HOME/rdbms/lib

                        ls -l config.s
                        ls: config.s: No such file or directory
                        • 9. Re: insufficient privilege to connect my DB
                          972355
                          My env settings , it may help you

                          *$ sort | env*

                          HOSTNAME=linuxserver
                          SHELL=/bin/bash
                          TERM=xterm
                          HISTSIZE=1000
                          TMPDIR=/tmp
                          USER=oracle
                          LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib
                          LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
                          ORACLE_SID=TSH1
                          ORACLE_BASE=/u01/app/oracle
                          MAIL=/var/spool/mail/oracle
                          PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
                          INPUTRC=/etc/inputrc
                          PWD=/home/oracle
                          LANG=en_US.UTF-8
                          ORACLE_TERM=xterm
                          SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                          SHLVL=1
                          HOME=/home/oracle
                          TMP=/tmp
                          LOGNAME=oracle
                          CLASSPATH=/u01/app/oracle/product/10.2.0/db_1/JRE:/u01/app/oracle/product/10.2.0/db_1/jlib:/u01/app/oracle/product/10.2.0/db_1/rdbms/jlib
                          LESSOPEN=|/usr/bin/lesspipe.sh %s
                          DISPLAY=:0.0
                          ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
                          G_BROKEN_FILENAMES=1
                          XAUTHORITY=/root/.xauthHRk0Sz
                          _=/bin/env
                          OLDPWD=/u01/app/oracle/product/10.2.0/db_1/rdbms/lib
                          • 10. Re: insufficient privilege to connect my DB
                            972355
                            My env settings , it may help you

                            *$ sort | env*

                            HOSTNAME=linuxserver
                            SHELL=/bin/bash
                            TERM=xterm
                            HISTSIZE=1000
                            TMPDIR=/tmp
                            USER=oracle
                            LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib
                            LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
                            ORACLE_SID=TSH1
                            ORACLE_BASE=/u01/app/oracle
                            MAIL=/var/spool/mail/oracle
                            PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
                            INPUTRC=/etc/inputrc
                            PWD=/home/oracle
                            LANG=en_US.UTF-8
                            ORACLE_TERM=xterm
                            SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
                            SHLVL=1
                            HOME=/home/oracle
                            TMP=/tmp
                            LOGNAME=oracle
                            CLASSPATH=/u01/app/oracle/product/10.2.0/db_1/JRE:/u01/app/oracle/product/10.2.0/db_1/jlib:/u01/app/oracle/product/10.2.0/db_1/rdbms/jlib
                            LESSOPEN=|/usr/bin/lesspipe.sh %s
                            DISPLAY=:0.0
                            ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
                            G_BROKEN_FILENAMES=1
                            XAUTHORITY=/root/.xauthHRk0Sz
                            _=/bin/env
                            OLDPWD=/u01/app/oracle/product/10.2.0/db_1/rdbms/lib
                            • 11. Re: insufficient privilege to connect my DB
                              asahide
                              Hi,

                              OK, Now dba group exists in /etc/groups ?
                              And Does your oracle user join in dba group ?
                              Check above and retry follows..
                              $ mv config.o config.o.orig
                              $ make -f ins_rdbms.mk ioracle 
                              Regards,
                              • 12. Re: insufficient privilege to connect my DB
                                972355
                                I can't add dba group with oracle user ..

                                *$ id*
                                uid=502(oracle) gid=502(oinstall) groups=502(oinstall)

                                Many times i tried , i can't !
                                • 13. Re: insufficient privilege to connect my DB
                                  972355
                                  *$ more /etc/group*
                                  root:x:0:root
                                  bin:x:1:root,bin,daemon
                                  daemon:x:2:root,bin,daemon
                                  sys:x:3:root,bin,adm
                                  adm:x:4:root,adm,daemon
                                  tty:x:5:
                                  disk:x:6:root
                                  lp:x:7:daemon,lp
                                  mem:x:8:
                                  kmem:x:9:
                                  wheel:x:10:root
                                  mail:x:12:mail
                                  news:x:13:news
                                  uucp:x:14:uucp
                                  man:x:15:
                                  games:x:20:
                                  gopher:x:30:
                                  dip:x:40:
                                  ftp:x:50:
                                  lock:x:54:
                                  nobody:x:99:
                                  users:x:100:
                                  dbus:x:81:
                                  floppy:x:19:
                                  vcsa:x:69:
                                  rpm:x:37:
                                  haldaemon:x:68:
                                  utmp:x:22:
                                  netdump:x:34:
                                  nscd:x:28:
                                  slocate:x:21:
                                  sshd:x:74:
                                  rpc:x:32:
                                  rpcuser:x:29:
                                  nfsnobody:x:65534:
                                  mailnull:x:47:
                                  smmsp:x:51:
                                  pcap:x:77:
                                  xfs:x:43:
                                  ntp:x:38:
                                  gdm:x:42:
                                  pegasus:x:65:
                                  sandya:x:500:
                                  sandyagupta:x:501:
                                  oinstall:x:502:
                                  dba:x:503:

                                  yes dba group is there. but oracle user is not a member of dba group.
                                  • 14. Re: insufficient privilege to connect my DB
                                    asahide
                                    Hi,
                                    # usermod -G 503 oracle
                                    Regards,
                                    1 2 Previous Next