Oracle - ORA-01034: ORACLE not available

When you see the following error

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0

and your ORACLE_HOME is set correctly. You may want to check if your ORACLE_SID spelled with wrong case. 

ORACLE_SID is case sensitive in Linux

I saw this https://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:318216852435

The SID is a site identifier. It plus the Oracle_home are hashed together in Unix to create a unique key name for attaching an SGA. If your Oracle_sid or Oracle_home is not set correctly, you'll get "oracle not available" since we cannot attach to a shared memory segment that is identified by magic key.

From Oracle website, the basic format of tnsnames.ora is

net_service_name= 
 (DESCRIPTION= 
   (ADDRESS=(protocol_address_information))
   (CONNECT_DATA= 
     (SERVICE_NAME=service_name))) 

net_service_name can be use when connecting with sqlplus

CONNECT username@net_service_name

If no net_service_name is given, it will use ORACLE_SID

Connectivity Concepts from Oracle is a good read about Service name and SID.


Comments

Popular Posts