Login into Oracle Database Error

Posted on

Question :

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?

Answer :

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
    
  • Leave a Reply

    Your email address will not be published. Required fields are marked *