ORA-01034: ORACLE 不可用 ORA-27101: 共享内存域不存在

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6555827/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 03:23:47  来源:igfitidea点击:

ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist

oracleoracle11gora-01034ora-27101

提问by maverick

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

尝试从客户端使用 service name 连接到服务器数据库时出现上述错误orcl。当我使用其他服务名称时,它正在连接dms

Below is my listener.ora

下面是我的 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?

请告诉我该怎么办?

回答by Siva Harsha

Open command prompt and execute the below commands:

打开命令提示符并执行以下命令:

set oracle_sid=DATABASE NAME
sqlplus /nolog
conn sys/sys as sysdba
shutdown abort
startup

回答by shrikanth Hosamani

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:

有时,数据库会无法正确挂载,因此我们需要手动挂载。为此,关闭它并启动它然后安装。以 oracle 用户身份登录,然后运行以下命令:

sqlplus / as sysdba;
shutdown immediate;
startup nomount;
alter database mount;
alter database open;

回答by John Adams

Make sure that your ORACLE_HOME and ORACLE_SID are correct To see the current values in windows, at the command prompt type

确保您的 ORACLE_HOME 和 ORACLE_SID 是正确的 要查看 windows 中的当前值,请在命令提示符下键入

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.

如果这些值不是您当前的 oracle home 和 SID,您需要更正它们。这可以在 Windows 环境变量中完成。

Check out this page for more info

查看此页面了解更多信息

回答by Luke Woodward

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 orclinstance, or ask your DBA to do this for you.

ORA-01034 和 ORA-27101 通常表示您尝试连接的数据库实例已关闭,并且您没有以有权启动它的用户身份进行连接。登录服务器 192.168.1.53 并启动orcl实例,或者让您的 DBA 为您执行此操作。

回答by Μιχ?λη? Αντων?πουλο?

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.

在 Windows XP 上有同样的问题。解决。该错误是由于系统日志已满引起的。控制面板 -> 管理工具 -> 事件查看器 右键单击​​应用程序日志,清除所有事件,可选择保存日志。系统日志的过程相同。重新启动,它应该可以工作。

回答by Tanuj Wagh

I faced the same issue while creating the connection on SQLDeveloper "ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist"

我在 SQLDeveloper 上创建连接时遇到了同样的问题“ORA-01034:ORACLE 不可用 ORA-27101:共享内存领域不存在”

Solution:

解决方案:

1.Update the listene.ora file to include the SID.

1. 更新 listene.ora 文件以包含 SID。

  SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
        (SID_NAME = PLSExtProc)
        (ORACLE_HOME = C:\oraclexe\app\oracle\product.2.0\server)
        (PROGRAM = extproc)
      )
      (SID_DESC =
        (SID_NAME = CLRExtProc)
        (ORACLE_HOME = C:\oraclexe\app\oracle\product.2.0\server)
        (PROGRAM = extproc)
      )
      (SID_DESC =
        ((GLOBAL_DBNAME = XE.DB)
        ((ORACLE_HOME = C:\oraclexe\app\oracle\product.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.

Oraclexe 目录可能将权限设置为“ ReadOnly”,将目录/子目录权限更改为读/写并重新启动侦听器服务。问题解决了。

回答by Ajay Takur

SQL> sqlplus "/ as sysdba"
SQL> startup

      Oracle instance started
      ------
      Database mounted.
      Database opened.

SQL> Quit

[oracle@hcis ~]$ lsnrctl start

回答by sporak

This same error occurred to me even though the ORACLE_HOMEand ORACLE_SIDseemed to be correctly set up.

即使ORACLE_HOMEORACLE_SID似乎已正确设置,我也发生了同样的错误。

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.

问题出在ORACLE_HOME,它不应该以斜杠字符结尾。当我删除结尾斜杠时,它开始正常工作。

# ? 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.

因此,即使看起来一切都配置良好,请检查您的变量。

回答by andreikashin

Run in cmd:

在cmd中运行:

sqlplus / as sysdba;

Then:

然后:

SQL> create pfile='c:/init.ora' from spfile;

Remove sga_targetline in init.orafile, then:

删除文件中的sga_targetinit.ora,然后:

SQL> create spfile from pfile='c:/init.ora';
SQL> startup;

回答by roj

I hit the same shared memory realm does not existsymptom (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.

我遇到了相同的shared memory realm does not exist症状(在 Windows 上),但原因不同。我刚刚安装了 Oracle (XE),经过一些故障排除后,确定我的安装已损坏,因为我安装时存在 ORACLE_HOME 环境属性。

If this is TLDR, skip to 'So to resolve:'!

如果这是 TLDR,请跳至“所以要解决:”!

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.

显然,Windows 安装从注册表读取 ORACLE_HOME 并且不需要(当然在我的情况下不应该有......)环境属性。

Remove it, as follows:

删除它,如下所示:

  1. Edit the system environment settings (Windows key and start typing 'env' and you should see this option come up.
  2. 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!)
  3. 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.
  1. 编辑系统环境设置(Windows 键并开始输入“env”,您应该会看到此选项出现。
  2. 删除任何名为 ORACLE_HOME 的用户和系统环境变量(如果存在)。(记下它们的值,主要是出于兴趣,但如果您出于某种原因想将它们放回原处,可能会有用!)
  3. 重新启动您的机器。不要只注销就乱搞——重新启动你的机器。默认情况下,Windows Oracle 安装使用 Windows 服务,您的安装目前非常糟糕 - 需要重新启动。

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:

重新启动后,我能够收到除“无消息文件...”以外的错误消息,并且可以开始查看问题所在。将 ORACLE_SID 设置为 XE 并连接 @XE 我得到了这个页面中的错误,即以下症状:

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.

另一个症状是:尽管启动了 Windows 侦听器和 XE 服务,但在启动“入门”页面时,它仍无法连接,并给出未找到错误(如果我没记错的话)。如另一个答案中所述,这可能是由于未启动 Windows 服务。在我的情况下,这些服务已启动,因此配置错误。

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!).

在这一点上,我想我的安装可能因为存在我应该重新安装的坏 ORACLE_HOME 环境属性而出现严重错误。(以前的重新安装没有帮助,但这些都是在我注意到 ORACLE_HOME 系统环境属性之前(可能是我一年前设置的!)。

So to resolve:

所以要解决:

  1. Close any app looking at the Oraclexe install directory (editors/explorer/cmd prompts)
  2. A quick trip to Add/Remove programs and uninstall OracleXe
  3. Double-check you have no ORACLE_HOME environment property set anywhere, remember - Windows will use registry entries to get it.
  4. Restart (take no chances - we're in this for the long term!)
  5. Did you make sure there was no ORACLE_HOME property?
  6. Run the Oracle installer again (as local admin account if applicable)
  7. You should be able to rejoice in a working install. I did, at least!
  1. 关闭任何查看 Oraclexe 安装目录的应用程序(编辑器/资源管理器/cmd 提示)
  2. 添加/删除程序和卸载 OracleXe 的快速之旅
  3. 仔细检查您在任何地方都没有设置 ORACLE_HOME 环境属性,记住 - Windows 将使用注册表项来获取它。
  4. 重新启动(不要冒险 - 我们长期致力于此!)
  5. 您确定没有 ORACLE_HOME 属性吗?
  6. 再次运行 Oracle 安装程序(如果适用,作为本地管理员帐户)
  7. 您应该能够为工作安装感到高兴。我做到了,至少!