ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist

Viewed 517115

I am getting the above error when trying to connect to a server database from a client using service name orcl. It is getting connected when I am using the other service name i.e. dms

Below is my listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = dms)
      (SERVICE_NAME = dms)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
#      (PROGRAM = extproc)
    )
  (SID_DESC =
     (SID_NAME = orcl)
     (SERVICE_NAME = dms)
    # (GLOBAL_DBANME = orcl)
      (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)
   #  (PROGRAM = extproc)
  )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))

    )
  )

ADR_BASE_LISTENER = /home/oracle/app/oracle
and tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
     #(SERVICE_NAME = orcl.localdomain)
      (ORACLE_SID = dms)
      (SERVICE_NAME = orcl)
    )
  )

DMS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.53)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dms)
      (ORACLE_SID = dms)
    )
  )

Please tell me what to do?

17 Answers

Run in cmd:

sqlplus / as sysdba;

Then:

SQL> create pfile='c:/init.ora' from spfile;

Remove sga_target line in init.ora file, then:

SQL> create spfile from pfile='c:/init.ora';
SQL> startup;

After wasting so much time i got to know that there was mistake in my syntax to connect with DB. I was using colon ":" instead of slash "/".

(1) if you use sid below is the syntax to get connection:

**"jdbc:oracle:thin:@{hostname}:{port}:{SID}"**

(2) if you use service name, below is the syntax to get connection:

"**jdbc:oracle:thin:@//{hostname}:{port}/{servicename}**"

In my case here, I just had to resurrect a server that was 9 years old, and Oracle was giving me this error.

For some reason, the server had been renamed, but the app/oracle/product/10.2.0/server/network/admin/listener.ora file was still declaring a LISTENER with the old HOST.

I had to put the same name that I had in /etc/hostname in the /etc/hosts, and also fix the name used in the listener.ora.

Also try directly startup:

sqlplus /nolog
conn / as sysdba
startup

I have seen this issue come up when attempting to start a sqlplus session like this:

sqlplus /nolog
connect user/password

The fix was to remove /nolog and to escape the user/password:

sqlplus 'user/password'

SQL> sqlplus "/ as sysdba"

SQL> startup

  Oracle instance started
  ------
  Database mounted.
  Database opened.

SQL> Quit

I also got same problem.I tried above mentioned steps and then it worked for me.You can try.

Related