问题
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)
)
)
Please tell me what to do?
回答1:
Open command prompt and execute the below commands:
set oracle_sid=DATABASE NAME
sqlplus /nolog
conn sys/sys as sysdba
shutdown abort
startup
回答2:
Some time. Database will not be mounted correctly , so we need to mount it manually... For that Shut down it and start it up then mount.... Run the following commands
login as oracle user then
sqlplus / as sysdba;
shutdown immediate;
startup nomount;
alter database mount;
alter database open;
回答3:
Make sure that your ORACLE_HOME and ORACLE_SID are correct To see the current values in windows, at the command prompt type
echo %ORACLE_HOME%
Then
echo %ORACLE_SID%
If the values are not your current oracle home and SID you need to correct them. This can be done in Windows environment variables.
Check out this page for more info
回答4:
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.
回答5:
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.
回答6:
Run in cmd:
sqlplus / as sysdba;
Then:
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;
回答7:
SQL> sqlplus "/ as sysdba"
SQL> startup
Oracle instance started
------
Database mounted.
Database opened.
SQL> Quit
[oracle@hcis ~]$ lsnrctl start
回答8:
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.
回答9:
I faced the same issue while creating the connection on SQLDeveloper "ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist"
Solution:
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.
回答10:
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:'!
My initial symptom was:
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.
Remove it, as follows:
- 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!
回答11:
Your listener.ora is misconfigured. There is no orcl service.
回答12:
I hope you have resolved your issue. If you still got issue then double check again if you install this Oracle under a domain account. I found a thread that says Oracle XE giving same error when installing under domain account. Please use a local account instead.
Source:
https://community.oracle.com/thread/2141735?start=0&tstart=0
回答13:
In my case here, I just had to resurrect a server that was 9 years old, and Oracle was giving me this error.
For some reason, the server had been renamed, but the app/oracle/product/10.2.0/server/network/admin/listener.ora
file was still declaring a LISTENER with the old HOST.
I had to put the same name that I had in /etc/hostname
in the /etc/hosts
, and also fix the name used in the listener.ora
.
来源:https://stackoverflow.com/questions/6555827/ora-01034-oracle-not-available-ora-27101-shared-memory-realm-does-not-exist