- ORA-27101: shared memory realm does not exist
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:
$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
- /data/home/oracle/atg/OracleDB_11.2.0.2/product/11.2.0/dbhome_1
1 comment:
wow. this is great. after so much of search, luckily i found your post and solved my problem. Thanks.
Post a Comment