2

I had installed Oracle 12 to my Linux box. I tried to login using sqlplus but it prompt out this error at below. How to solve it?

Enter user-name: SYSDBA

Enter password: ERROR: ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3701

Additional information: 542678011

Process ID: 0 Session ID: 0 Serial number: 0

EDIT: How to find out default ORACLE_SID?

0

1 Answer 1

2

There could be various reason for this error.

  • You are using wrong ORACLE_SID and ORACLE_HOME.
  • The instance that you are trying to connect isn't up and running.

    When you have wrong ORACLE SID and HOME.

    I could reproduce the error by changing my SID to something else. My SID is oracdb.

    [oracle@myserver ~]$ ps -ef | grep pmon
    oracle   29336     1  0 Apr27 ?        00:00:22 ora_pmon_oracdb
    

    But I changed it to orcl.

    [oracle@myserver Desktop]$ export ORACLE_SID=orcl
    

    Then I tried to connect to the database using SQL*PLUS.

    [oracle@myserver Desktop]$ sqlplus sys
    
    SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:23:50 2017
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password: 
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3701
    Additional information: -923528497
    Process ID: 0
    Session ID: 0 Serial number: 0
    

    Then I changed it to original SID.

    [oracle@myserver ~]$ export ORACLE_SID=oracdb
    [oracle@myserver ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:28:40 2017
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
    

    When your instance is down and connected as a non-sys user

    Use the following linux command to check whether some of the important background processes are running or not such PMON or SMON.

    [oracle@myserver ~]$ ps -ef| grep pmon
    oracle   57587 57044  2 00:52 pts/3    00:00:00 grep pmon
    

    My oracle instance is down.

    Now, as you have tried, I attempt to connect to the database using non-sys user, sysdba is a privilege not a database user.

    [oracle@myserver ~]$ sqlplus sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:04 2017
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Enter password: 
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3701
    Additional information: -688980181
    Process ID: 0
    Session ID: 0 Serial number: 0
    
    
    Enter user-name: 
    

    I got the same error as you have got.

    Now, connect as sysdba/sysoper and start the database instance.

    [oracle@myserver ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 12.2.0.1.0 Production on Tue May 2 00:53:36 2017
    
    Copyright (c) 1982, 2016, Oracle.  All rights reserved.
    
    Connected to an idle instance.
    
    SQL> startup
    
  • 6
    • How to find out my default ORACLE_SID?
      – nicholas
      May 2, 2017 at 7:50
    • You can go to $ORACLE_HOME/dbs directory and find initialization parameter files such as spfile<SID>.ora or init<SID>.ora.
      – atokpas
      May 2, 2017 at 7:54
    • @peterwkc: Or if your instance is up and running then $ ps -ef | grep pmon shows instance name at the end of the process name.
      – atokpas
      May 2, 2017 at 8:07
    • @peterwkc, For linux & Solaris , you can also find ORACLE_SID from "pgrep -lf pmon" . And In linux you can also find from this query" select distinct sid from v$mystat;" May 2, 2017 at 8:29
    • I"m issue this command ps -ef | grep pmon root 31688 30893 0 19:19 pts/0 00:00:00 grep --color=auto pmon. Is my oracle instance is up? How to start the oracle instance?
      – nicholas
      May 2, 2017 at 11:19

    Your Answer

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

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