In my previous articles i have given the basic idea about multiple oracle errors in detail. I have given the one by one errors.In this article i would like to throw light on most important error coming while working on oracle- ORA-27101: shared memory realm does not exist error. The ORA-27101: shared memory realm does not exist will come due to when local shared memory realm is not accessible. You can see more details in oracle documentation where you will find out multiple types of oracle errors in detail.
Why ” ORA-27101: shared memory realm does not exist ” is coming?
In this section i would like to give you the actual error coming and why that error is coming in detail. I would like to explain multiple scenarios with the error also try to give the resolution of the error.
There are two scenarios due to which this error is occurring :
Scenario 1 :ORACLE_HOME or ORACLE_SID is wrong
There are so many times where ORACLE_HOME and ORACLE_SID is wrong and due to that ORA-27101 error will come.
Scenario 2 : When Database itself is Down
There are so many times the database will be down due to network error and due to that ORA-27101 error will come.We require to check what kind of error is occurring.
Error Description :
[oracle@Amit_db~]$ sqlplus amit_database/Pass@W0RD
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 4 20:14:07 2020
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
I would like to discuss the scenarios in detail.Before that we require to think about the basic cause and its basic solution.
The basic Cause: The basic cause of this error is Unable to locate shared memory realm
Required Action: The DBA need to verify that the realm is accessible
How to resolve the Error –ORA-27101: shared memory realm does not exist ?
In this section i would like to give the 2 scenarios i explained in above paragraph and i will try to give the resolution for the error.
Scenario 1:Invalid ORACLE_HOME and ORACLE_SID:
The basic cause of ORA-27101 is usually due to the invalid ORACLE_HOME and ORACLE_SID parameters at Operating system level.
Steps to check whether ORACLE_HOME and ORACLE_SID Parameters set correct way,
Step 1 : Check whether the ORACLE_HOME is without slash
Step2 : We require to check the trailing slash at first step.
Example :
$ echo $ORACLE_HOME
$ /app/oracle/832/ << This is incorrect because of trailing slash /832/
$ echo $ORACLE_HOME
$ /app/oracle/832<<The oracle home is Correct because slash is not there
Step 3 : Check and Export Oracle SID
[oracle@Amit_db~]$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0/amu_01
[oracle@192 ~]$ echo $ORACLE_SID
Amit_test_db
In above case ORACLE_SID is not right, we need to export ORACLE_SID to the valid one which is ora832
[oracle@Amit_db~]$ export ORACLE_SID=ora832
[oracle@Amit_db~]$ sqlplus amit_database/Pass@W0RD
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 4 20:14:07 2020
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Using above way we can resolve the issue with ORACLE_SID or ORACLE_HOME and we can resolve the issue.
Resolution :
Basically, to resolve ORA-27101, Once ORACLE_HOME and ORACLE_SID are correct, and then try to start SQL*Plus.
Scenario 2: Database is down:
We can also face the ORA-27101 error when database is down.So to resolve the issue we require to start the database again.
[oracle@Amit_db~]$ sqlplus sys/sys as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on tue Aug 4 19:22:38 2020
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1356784321 bytes
Fixed Size 1234522bytes
Variable Size 187766663bytes
Database Buffers 102233333333bytes
Redo Buffers 23343334bytes
Database mounted.
Database opened.
Resolution :
To start the database again if it is down.
Using the database start operation you require to connect to the databases.These are the two scenarios for resolving ORA-27101: shared memory realm does not exist with examples.Hope you will get idea about resolving the ORA-27101: shared memory realm does not exist error.If you like this article or if you have any issues with the same kindly comment in comments section.
Problem
This technote addresses the error «Shared memory Realm does not exist». This can occur when you try to log into IBM® Rational® ClearQuest® on UNIX® platforms.
Symptom
This Oracle error can occur when you try to log into the ClearQuest UNIX client:
Openlink Broker Error: Shared memory Realm does not exist.
OpenLink: [Oracle Server]ORA-01034: Oracle not available. ORA-27101: Shared memory realm does not exist. SVR4 Error: 2: No such file or directory [SQLSTATE:S1000]
Cause
The case of the Oracle SID or HOST values might be incorrect. For example, the HOST or SID values of the connection options are stored all in upper case. The server may be defined with lower case values.
Environment
This problem occurs with ClearQuest environments hosted on Oracle databases. It is observed when using UNIX-based operating systems.
Resolving The Problem
Change the connection options for your ClearQuest databases. They should match the case of values as configured on the Oracle server.
- To fix the user database connection options, you will need to login to ClearQuest Designer on Microsoft® Windows® computer.
- Select the menu option Database > Update User Database Properties.
- This will bring up the Update User Database Properties dialog.
- In the dialog, update the SID and/or HOST values so that they have the correct case.
- Now update the Schema Repository. On the same computer, open the ClearQuest Maintenance Tool.
- Select the menu option Schema Repository > Update.
- Correct the connection options in the same manner.
All source code and/or binaries attached to this document are referred to here as «the Program». IBM is not providing program services of any kind for the Program. IBM is providing the Program on an «AS IS» basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
Related Information
[{«Product»:{«code»:»SSSH5A»,»label»:»Rational ClearQuest»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Database Configuration/Connectivity — Oracle»,»Platform»:[{«code»:»PF002″,»label»:»AIX»},{«code»:»PF010″,»label»:»HP-UX»},{«code»:»PF027″,»label»:»Solaris»}],»Version»:»2003.06.00;2003.06.12;2003.06.13;2003.06.14;2003.06.15;2003.06.16″,»Edition»:»»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]
In [1], it has listed some tips for resolving Oracle exception:
- ORA-27101: shared memory realm does not exist
In this article, we will show you yet another tip of resolving ORA-27101.
The Background
There are two teams share the same DB server in our environment. Team A started an Oracle instance without shutting it down. As a team B member, how do you figure out how to shut it down?
Steps
- Find out the SID name:
- ps -ef | grep smon (or pmon)
- For example, the command shows:
- oracle 32607 1 0 10:12 ? 00:00:03 ora_smon_SOAR2
- So, we know the SID is named SOAR2.
- Find out Oracle Home path:
- Use pmap command to report the memory map of smon process. For example, we issue: «pmap 32607» and one of the output line shows:
- 00002b3f57270000 4K rwx— /disk2/home/oracle/atg/OracleDB_11.2.0.2/product/11.2.0/dbhome_1/lib/libocrutl11.so
- Use pmap command to report the memory map of smon process. For example, we issue: «pmap 32607» and one of the output line shows:
- Setup ORACLE_HOME and ORACLE_SID environment variable
- For example, we have set them using Linux bash:
- export ORACLE_HOME=/disk2/home/oracle/atg/OracleDB_11.2.0.2/product/11.2.0/dbhome_1
- export ORACLE_SID=SOAR2
- For example, we have set them using Linux bash:
However, after we started sqlplus and tried to shutdown our instance, we got:
$sqlplus «/ as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 25 17:15:08 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> shutdown immediate;
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
The Issue
The problem is that /data/home is a symbolic link to /disk2/home directory. Oracle does not recognize one name used in Oracle Home path if you started it using another name.
To check what the environment variable ORACLE_HOME was set, you can check the process environment (/proc/<pid>/environ) . For example, from the following file:
- /proc/32607/environ
we have found that ORACLE_HOME was set to be:
- /data/home/oracle/atg/OracleDB_11.2.0.2/product/11.2.0/dbhome_1
After we have reset our ORACLE_HOME to the new path, we have resolved ORA-27101 issue.
References
- ORA-27101: shared memory realm does not exist tips
- ORA-01031: insufficient privileges
ORA-27101: shared memory realm does not exist
Cause: Unable to locate shared memory realm
Action: Verify that the realm is accessible
Reference: Oracle Documentation
There may be 2 scenarios, which may lead you to encounter ORA-27101
1) Invalid ORACLE_HOME and ORACLE_SID
2) Database is down
[oracle@192 ~]$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 22 16:48:05 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Scenario 1: Invalid ORACLE_HOME and ORACLE_SID:
ORA-27101 is usually due to the invalid ORACLE_HOME and ORACLE_SID parameters at OS level. You should investigate that ORACLE_HOME and ORACLE_SID are set correctly, and ORACLE_HOME should be without trailing slash.
[oracle@192 ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/10.2.0/db_1
[oracle@192 ~]$ echo $ORACLE_SID
testdb
In our case ORACLE_SID was not correct, we need to export ORACLE_SID to the valid one which is ora10g
[oracle@192 ~]$ export ORACLE_SID=ora10g
[oracle@192 ~]$ sqlplus scott/tiger
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 22 16:52:11 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Scenario 2: Database is down:
You may also face it when the database is down, to solve ORA-27101 you may have to start the database only
[oracle@192 ~]$ sqlplus sys/sys as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 22 17:07:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 1219112 bytes
Variable Size 167773656 bytes
Database Buffers 1040187392 bytes
Redo Buffers 15556608 bytes
Database mounted.
Database opened.
Related Posts:
ORA-04031: unable to allocate n bytes of shared memory
— ORA-01034: ORACLE not available
— ORA-01157: cannot identify/lock data file string — see DBWR trace file
— ORA-00849: SGA_TARGET cannot be set to more than MEMORY_MAX_TARGET
— ORA-00604: error occurred at recursive SQL level string
— ORA-00600: internal error code
— ORA-00257: archiver error. Connect internal only, until freed