5 Replies Latest reply: Dec 27, 2012 12:36 AM by DB RSS

    Unable to connect to the Database

    user7202581
      Hi,

      The users are geting an error when connecting to the DB.
      I'm also not able to connect thru sqlplus
      I get the message

      $ sqlplus "/as sysdba"

      SQL*Plus: Release 10.2.0.5.0 - Production on Wed Dec 26 14:39:55 2012

      Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

      ERROR:
      ORA-01075: you are currently logged on

      ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes o bytes of shared memory ("","","","")
      ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes of shared memory ("shared pool","select a.obj# OBJOID, a.clas...","sga heap(1,0)","kglsim hea

      I need to restart the DB.Please let me know how this can be done.

      Regards,
      Narayan
        • 1. Re: Unable to connect to the Database
          user7202581
          Enter password:
          ERROR:
          ORA-00604: error occurred at recursive SQL level 1
          ORA-04031: unable to allocate 4064 bytes of shared memory ("shared
          pool","select u.name, o.name, trigg...","sga heap(1,0)","kglsim heap")
          ORA-04031: unable to allocate 4064 bytes of shared memory ("shared
          pool","unknown object","sga heap(1,0)","kglsim heap")

          I get this error when trying to login to the DB.

          Regards,
          Narayan
          • 2. Re: Unable to connect to the Database
            Karan Kukreja
            You need to increase your SGA.

            Please tell us which oracle version are you on. ( looks 10.2.0.5.0 to me).

            Steps you have to follow :



            shutdown your DB.

            Then change the SGA to a higher value in the init.ora file and startup pfile=init.ora to reflect.

            If the init.ora file does not exists then create one ( assume its running on spfile) by the command :

            create pfile from spfile.

            look for SGA_TARGET and resize it to a higher value.

            incase you do not find SGA_TARGET look for SHARED_POOL and increase the size.

            Regards
            KK

            Edited by: Kk on Dec 27, 2012 4:33 AM
            • 3. Re: Unable to connect to the Database
              sb92075
              user7202581 wrote:
              Enter password:
              ERROR:
              ORA-00604: error occurred at recursive SQL level 1
              ORA-04031: unable to allocate 4064 bytes of shared memory ("shared
              pool","select u.name, o.name, trigg...","sga heap(1,0)","kglsim heap")
              ORA-04031: unable to allocate 4064 bytes of shared memory ("shared
              pool","unknown object","sga heap(1,0)","kglsim heap")

              I get this error when trying to login to the DB.

              Regards,
              Narayan
              when was the last time you could successfully log into the DB without error?
              What changed since then?
              • 4. Re: Unable to connect to the Database
                Osama_Mustafa
                please post Alertlog
                • 5. Re: Unable to connect to the Database
                  DB
                  Cause: More shared memory is needed than was allocated in the shared pool.

                  1. This can be fixed by increasing the shared_pool_size.

                  2.The ORA-04031 error also happens when you are using automatic memory management (sga_max_size), and the memory specific is too small.

                  for your reference:http://www.dba-oracle.com/t_ora_04031_unable_to_allocate_shared_memory.htm

                  Thanks,
                  Regards,Db.