ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist
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) ) )
17 Answers 17
Open command prompt and execute the below commands:
set oracle_sid=DATABASE NAME sqlplus /nolog conn sys/sys as sysdba shutdown abort startup
why is it that when I am trying to connect with ‘connect’ cmd, I am getting ORA-27101, but when I am doing conn sys/sys as sydba then I am able to connect??
Sometimes, the database will not be mounted correctly, so we need to mount it manually. For that, shut it down and start it up then mount. Log in as oracle user, then run the following commands:
sqlplus / as sysdba; shutdown immediate; startup nomount; alter database mount; alter database open;
SQL> sqlplus "/ as sysdba" SQL> startup Oracle instance started ------ Database mounted. Database opened. SQL> Quit [oracle@hcis ~]$ lsnrctl start
startup does not seem to work, seems db setup issue SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file ‘/opt/oracle/product/12.2.0.1/dbhome_1/dbs/initxe.ora’
For a newly installed Oracle 19c Database before creating any database for use, this is what helped start my database. I had not noticed that I hadn’t started it and was wondering where the ORA-01034 was coming from.
Make sure that your ORACLE_HOME and ORACLE_SID are correct To see the current values in windows, at the command prompt type
If the values are not your current oracle home and SID you need to correct them. This can be done in Windows environment variables.
This answer was close enough trigger my solution. Although my $ORACLE_HOME & $ORACLE_SID variables were correct, my process was evoking a parameter file with that called the wrong SID.
ORA-01034 and ORA-27101 normally indicate that the database instance you’re attempting to connect to is shut down and that you’re not connected as a user who has permission to start it up. Log on to the server 192.168.1.53 and start up the orcl instance, or ask your DBA to do this for you.
Had the same issue on windows XP. Resolved. The error was caused due to the system log being full. Control Panel -> Administrative Tools -> Event viewer Right click on application log, clear all events, optionaly save the log. Same process for system log. Restart and it should work.
This same error occurred to me even though the ORACLE_HOME and ORACLE_SID seemed to be correctly set up.
The problem was in ORACLE_HOME , which is not supposed to end with a slash character. When I removed the ending slash, it started to work properly.
# ❌ INCORRECT export ORACLE_HOME=/usr/local/oracle/11gR2/ # ✔️ CORRECT export ORACLE_HOME=/usr/local/oracle/11gR2
So, even if it seems everything is configured fine, check your variables for this.
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;
I faced the same issue while creating the connection on SQLDeveloper «ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist»
1.Update the listene.ora file to include the SID.
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) (PROGRAM = extproc) ) (SID_DESC = ((GLOBAL_DBNAME = XE.DB) ((ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) ((SID_NAME = XE) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = USMUMTBALAKDAS2.us.deloitte.com)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE)
The Oraclexe directory may have the permission set to «ReadOnly», Change the directory/sub-directory permission to read/write and restart the listener services. Problem is solved.
I hit the same shared memory realm does not exist symptom (on Windows) but for a different reason. I had just installed Oracle (XE) and after some troubleshooting, established that my installation was corrupt due to the presence of an ORACLE_HOME environment property at the time I installed it.
If this is TLDR, skip to ‘So to resolve:’!
Message 850 not found; No message file for product=NETWORK, facility=NL
Apparently the Windows install reads the ORACLE_HOME from the registry and doesn’t need (and certainly in my case shouldn’t have. ) an environment property.
- Edit the system environment settings (Windows key and start typing ‘env’ and you should see this option come up.
- Delete any User and System Environment Variables called ORACLE_HOME, if present. (make a note of their values, mainly out of interest, but may be of use if you want to put them back for some reason!)
- Restart your machine. Don’t muck around with just a log off — restart your machine. The Windows Oracle install uses Windows services by default and your installation is currently very bad — it needs a restart.
Following the restart I was then able to get error messages other than ‘No message file. ‘ and could start looking at what the issue was. Setting the ORACLE_SID to XE and connecting @XE I got as far as the errors in this page, namely the following symptoms:
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist
Another symptom was: When launching the ‘Get started’ page it failed to connect, giving a not found error (if I recall correctly), despite the Windows listener & XE services being started. As noted in another answer, this could be due to the windows services not being started. In my case those services were started, so something else was misconfigured.
At this point, I figured maybe my install had just gone so badly wrong due to the presence of my bad ORACLE_HOME environment property that I should reinstall. (Previous reinstalls hadn’t helped, but those had all been before I noticed the ORACLE_HOME system environment property (probably set up by me a year ago!).
So to resolve:
- Close any app looking at the Oraclexe install directory (editors/explorer/cmd prompts)
- A quick trip to Add/Remove programs and uninstall OracleXe
- Double-check you have no ORACLE_HOME environment property set anywhere, remember — Windows will use registry entries to get it.
- Restart (take no chances — we’re in this for the long term!)
- Did you make sure there was no ORACLE_HOME property?
- Run the Oracle installer again (as local admin account if applicable)
- You should be able to rejoice in a working install. I did, at least!
Oracle database : ORA.01034:ORACLE not available
I installed oracle 12c r2 in ubuntu 18.04 and when I enter SqlPlus and execute a query it gives me error. To install the oracle I followed these two guides: 1- https://tutorialforlinux.com/2018/05/09/how-to-install-oracle-12c-r2-database-on-ubuntu-18-04-bionic-64bit-easy-guide/ 2- https://etc.to/confluence/pages/viewpage.action?pageId=20480023 The error that gives me is the following:
ERROR at line 1: ORA-01034:ORACLE not available Process ID:0 Session ID: Serial numbre:0
Connectinc to (ADDRESS=(PROTOCOL=tcp)(HOST)(PORT=1521)) TNS-12541:TNS: no listener tns-12560 TNS:protocol adapter error TNS-00511: No listener Linux error:111: Connection refused
Can anybody help me?Thanks!! MORE INFO now when I put lsnrctl status I get this, but in sqlplus the failure of above still appears
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 19-OCT-2018 01:53:18 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 19-OCT-2018 01:52:14 Uptime 0 days 0 hr. 1 min. 5 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /u01/app/oracle/diag/tnslsnr/andoni-VirtualBox/listener/alert/log.xml Listening Endpoints Summary. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=andoni-VirtualBox)(PORT=1521))) The listener supports no services The command completed successfully
Enter user-name: sys as sysdba Enter password: Connected to an idle instance. SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/u01/app/oracle/product/12/dbhome_1/dbs/initSID.ora' SQL>
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist ORACLE 10g XE
Dont know what went wrong. It worked perfectly first time untill i restarted my Machine.
Is the database configured to start up automatically; or did you start it manually after your reboot? Or are you trying to connect as sys to start it up — in which case you forgot the as sysdba part?
@AlexPoole — this usually happens when people have just installed Oracle on Ubuntu (and perhaps other unsupported flavors of Linux). The database is started at the end of the installation process, and one can work in it — until they restart the OS, at which point the db does not restart automatically. To be entirely honest, I forgot to do what I put in my Answer below when I installed Oracle on Ubuntu a while back (luckily I remembered there was a step I had skipped. which is what I put in the Answer).
@mathguy — that’s what I figured (and answered on that assumption), though who’s still installing 10g? *8-) I think it hasn’t restarted automatically; and the attempt to connect as sys to do it manually isn’t quite right.
5 Answers 5
It looks like your database didn’t start automatically after your machine rebooted, and you’re trying to connect as SYS in order to start it. You’re currently trying to connect without specifying the SYSDBA role.
$ sqlplus /nolog SQL*Plus: Release 11.2.0.2.0 Production on Thu Feb 16 16:04:26 2017 Copyright (c) 1982, 2010, Oracle. All rights reserved. SQL> connect sys/12345 ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist SVR4 Error: 2: No such file or directory Process ID: 0 Session ID: 0 Serial number: 0
With the role specified it connects to the idle instance:
SQL> connect sys/12345 as sysdba Connected to an idle instance. SQL>
You can then issue the startup command.
You can also connect straight from the command line:
$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Thu Feb 16 16:07:47 2017 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to an idle instance. SQL>
The password you supply for SYS can be anything, as it relies on OS authentication anyway. You have to supply the role though. And be logged in to the OS as a user in the right group, of course, and have $ORACLE_HOME and $ORACLE_SID set correctly, etc.