6 Replies Latest reply: Apr 24, 2013 9:27 AM by user8596912 RSS

    Unable to connect to oracle database

    977214
      Hi All,

      While after connecting to server via my userid( its an externally id) ,after setting ORACLE_HOME and SID,
      while entering sqlplus / command,its not connecting.Error am getting is:-

      ERROR:
      ORA-01034: ORACLE not available
      ORA-27123: unable to attach to shared memory segment
      HP-UX Error: 22: Invalid argument

      PLease help me to sort it out.

      When i tried to connect the server using oracle id,the database which am trying to connect with my id is running and fine.
        • 1. Re: Unable to connect to oracle database
          Harm Joris ten Napel-Oracle
          Hi

          ora-1034 means it cannot find the SGA at the id based on ORACLE_HOME and ORACLE_SID,
          so either db is not running or any of those values is not correct

          greetings,

          Harm ten Napel
          • 2. Re: Unable to connect to oracle database
            977214
            Thanks for the reply...

            Verified that oracle database is running.ORACLE_HOME and SID exported correctly before connecting.This error occurs only when am trying to connect with one particular user (say "ABC") via putty. .profile also set correctly

            Edited by: user8523067 on Mar 5, 2013 7:00 AM
            • 3. Re: Unable to connect to oracle database
              EdStevens
              user8523067 wrote:
              Thanks for the reply...

              Verified that oracle database is running.ORACLE_HOME and SID exported correctly before connecting.This error occurs only when am trying to connect with one particular user (say "ABC") via putty. .profile also set correctly

              Edited by: user8523067 on Mar 5, 2013 7:00 AM
              You insist 'everything' is set correctly, but Oracle seems to disagree ....

              OK, so have this 'one particular user' do the following as soon as they are connected to the server:
              id
              env|egrep 'ORA|PATH' | sort
              ps -ef|grep pmon
              And then execute their sqlplus command and connect.

              Copy the entire session and paste back to here.
              You are in luck. You can configure putty to log the entire session to a log file.
              • 4. Re: Unable to connect to oracle database
                977214
                Here am pasting the output of session...Please have a look.


                acgx0456>$ id
                uid=115(aed) gid=153(aed) groups=20(users),101(dba)

                acgx0456>$ env|egrep 'ORA|PATH' | sort
                LD_LIBRARY_PATH=/opt/cob64/lib
                MANPATH=/usr/local/share/man/%L:/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/mx/share/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/usr/dt/share/man:/opt/samba/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/gnome/man:/opt/perf/man/%L:/opt/perf/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/graphics/common/man:/opt/perl/man:/opt/prm/man/%L:/opt/prm/man:/opt/wbem/share/man:/opt/wlm/share/man/%L:/opt/wlm/share/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/ssh/share/man:/opt/hpnpl//man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/sec_mgmt/share/man/%L:/opt/sec_mgmt/share/man:/opt/aCC/share/man/%L:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/image/share/man:/opt/imake/man:/opt/cobol/cobdir/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/opt/cifsclient/share/man:/opt/hpsmdb/pgsql/man:/opt/resmon/share/man/%L:/opt/samba/WTEC_Support_Tools/man:/opt/perl_32/man:/opt/perl_64/man:/opt/sfmdb/pgsql/man:/opt/sfm/share/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/aCC/share/man:/opt/cadvise/share/man/%L:/opt/cadvise/share/man:/opt/sentinel/man/%L:/opt/sentinel/man:/opt/openssl/fips/0.9.7/man:/opt/openssl/fips/0.9.8/man:/opt/resmon/share/man:/opt/syncsort/man
                ORACLE_HOME=/u01/app/oracle/product/10.2.0
                ORACLE_SID=ac2e
                ORAENV_ASK=YES
                PATH=/opt/cob64/bin:/usr/bin:/opt/aCC/bin:/opt/cobol/bin:/opt/ansic/bin:/usr/ccs/bin:/opt/perl/bin:/usr/contrib/bin:/usr/local/bin:/opt/sudo/bin/:opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/resmon/bin:/opt/pd/bin:/opt/gnome/bin:/opt/perf/bin:/opt/ignite/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/graphics/common/bin:/opt/perl/bin:/opt/prm/bin:/usr/sbin/diag/contrib:/opt/mx/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/wlm/bin:/opt/hpnpl//bin:/opt/langtools/bin:/opt/sec_mgmt/spc/bin:/opt/imake/bin:/opt/vnc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/firefox:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sfm/bin:/opt/thunderbird:/opt/gwlm/bin:/opt/cadvise/bin:/opt/sentinel/bin:/usr/local/bin:.:/u01/app/oracle/product/10.2.0/bin:/prism/bin:opt/syncsort/bin:/prism/bin
                SHLIB_PATH=/opt/cob64/lib:/u01/app/oracle/product/10.2.0/lib:/opt/syncsort/lib:/opt/cob64/lib

                acgx0456>$ ps -ef|grep pmon
                oracle 6615 1 0 Feb 13 ? 2:07 ora_pmon_ac2e
                oracle 7268 1 0 Feb 13 ? 0:56 ora_pmon_ac2c
                oracle 7832 1 0 Feb 13 ? 1:09 ora_pmon_ac2d
                aed 12651 11780 0 16:27:38 pts/0 0:00 grep pmon

                acgx0456>$ echo $ORACLE_HOME
                /u01/app/oracle/product/10.2.0

                acgx0456>$ echo $ORACLE_SID
                ac2e

                acgx0456>$ sqlplus /

                SQL*Plus: Release 10.2.0.4.0 - Production on Tue Mar 5 16:28:49 2013

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

                ERROR:
                ORA-01034: ORACLE not available
                ORA-27123: unable to attach to shared memory segment
                HP-UX Error: 22: Invalid argument
                Additional information: 1
                Additional information: 12


                Enter user-name:
                • 5. Re: Unable to connect to oracle database
                  Paul R
                  is the oracle instance you want to connect to actually running :

                  ps -ef | grep smon

                  is there maybe a shared memory segment floating around owned by the os user that runs the instance :

                  ipcs -m
                  • 6. Re: Unable to connect to oracle database
                    user8596912
                    Hi, are you getting this error after performing migration of database, like NO-ASM to ASM or after up-gradation