ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist| Cause: | Oracle was not started up. Possible causes include the following: - The SGA requires more space than was allocated for it. - The operating-system variable pointing to the instance is improperly defined. |
An ORA-01034 ora error occurs when Oracle is not started or you don't have the proper environmnet variables setup. If you shut the database down with "NORMAL" option and there are active sessions you may keep getting this message when you try and start the instance. If you are trying to login you may need to set the TWO_TASK variable.
If you get a ORA-01034 when you issue the login command (in sqlplus, imp, exp,..) without giving the DB name, check the value of the TWO_TASK environment parameter. This is the database to which a user connects by default. Maybe the TWO_TASK points to a database which is down or does not exists at all. Try export TWO_TASK=sid.
Older versions of Oracle used to leave a lock file in the $ORACLE_HOME/dbs directory - like lkSIDNAME. The way to remove this file is to:
Fixing the issue:
For older versions of oracle:
#export ORACLE_SID=<yoursid>
#export ORACLE_HOME=<your_oracle_home>
#export PATH=$PATH:$ORACLE_HOME/bin
svrmgrl
connect internal
shutdown abort;
startup
For newer versions of oracle:
#export ORACLE_SID=<yoursid>
#export ORACLE_HOME=<your_oracle_home>
#export PATH=$PATH:$ORACLE_HOME/bin
#sqlplus '/ as sysdba'
SQL> shutdown abort;
SQL> startup
Also if you still encounter this problem, check your sqlnet.ora file:
If you see an entry like SQLNET.AUTHENTICATION_SERVICES=(NTS), change it on trial to SQLNET.AUTHENTICATION_SERVICES=(NONE) . If this helps, for some reason you cannot use NTS (Windows Native Authentication) and it seems you have a windows domain related problem.
Bottom line:
A)For Local Connections:
----------------------------
1)Verify the ORACLE_SID and ORACLE_HOME is set properly. You can check the variable in UNIX by,
# echo $ORACLE_SID
# echo $ORACLE_HOME
B)For Remote Connections:
-------------------------------
1)Verify the ORACLE_HOME is set correctly for all listed Oracle databases. If the ORACLE_HOME points to the different oracle version software, but the database was created using a different version, then this error can occur.
2)Review the listener.ora file and it is properly set. Like if you set ORACLE_HOME path inside listener ended by slash(/) then the error will come.
Incorrect:
(ORACLE_HOME = /opt/oracle/product/10.2.0/)
Correct:
(ORACLE_HOME = /u01/oracle/product/10.2.0)
3)If listener.ora use SID then verify that you have set properly ORACLE_SID. Also be sure about listener services by issuing lsnrctl services.
4)Verify the database is running on server machine while you connect as normal user.
Hope this helps.