【问题标题】:Oracle 11 XE on Ubuntu giving ORA-27101: shared memory realm does not existUbuntu 上的 Oracle 11 XE 给出 ORA-27101:共享内存领域不存在
【发布时间】:2023-03-24 08:12:01
【问题描述】:

我正在尝试在我的 ubuntu 系统上设置 oracle 11g xe。 我从http://meandmyubuntulinux.blogspot.com/2012/05/installing-oracle-11g-r2-express.html 上的说明开始 以及它的其他链接。 一切正常,数据库已安装。 XE 架构被创建。 问题:我无法登录数据库。

当我尝试时

sqlplus / as SYSDBA

我明白了

ERROR:
ORA-01031: insufficient privileges

Enter user-name: root
Enter password: 
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0

我检查了 ORACLE_SID 是 XE 我已手动将 root 用户加入 DBA 组

Listener.ora 中一切正常。我还按照一些博客中的建议创建了 initXE.ora,并将其分配给 DBA 组并将其放入类路径中。

我想我几乎尝试了所有方法。什么都没有出现在我的脑海中。

问题:我还能如何登录?

【问题讨论】:

  • This page 可能会有所帮助。
  • 您是否尝试过以 oracle 用户身份运行 sqlplus(不是 作为 root 用户)?
  • OP 需要通过 ORA-01031 才能启动实例并摆脱 ORA-27101?
  • 我在 oracle 10g XE 上也遇到了同样的问题。 suod /etc/init.d/oracle-xe restart 对我有用。

标签: linux oracle ubuntu oracle11g


【解决方案1】:

好像您的 oracle 数据库没有运行。当您使用 BEQ 适配器时,共享内存是您的客户端用来与服务器通信的 - 即您没有在网络上运行。如果服务器已启动,请检查 ps -fuoracle(假设您将数据库用户命名为 oracle)。

【讨论】:

    【解决方案2】:

    使用此命令使用 SQL plus 登录

    sqlplus {username}/{password}@//{ip}:{port}/{SID}
    

    样本:

    sqlplus test_username/test_password@//192.168.0.12:1521/val
    

    【讨论】:

    • 好的。这对我行得通。但是,命令行上的明文密码?一定有更好的解决方案吧?
    【解决方案3】:

    您必须创建一个新用户,然后才能连接

      $> su - oracle
      $> . goo
      $> sqlplus / as sysdba
      SQL> create user <myuser1> identified by <mypassword>;
      SQL> grant connect, resource to <myuser1>;
      SQL> connect <myuser1>/<mypassword>
    

    已编辑
    启动实例

      $>sys as sysdba
      SQL>Enter password:<*****>
      SQL>startup open
    

    【讨论】:

    • That error generally means there's no Oracle instance (the processes) to connect to. Someone needs to log in and start the instance. 这与缺少用户无关
    • 你是对的,这就是为什么我会更改发布的答案!
    【解决方案4】:

    以 sys 用户身份连接到 Oracle 并运行这些命令。

    sqlplus sys/sys as sysdba
    shutdown
    startup
    exit
    

    【讨论】:

      猜你喜欢
      • 2011-03-19
      • 1970-01-01
      • 2011-09-27
      • 2017-07-19
      • 2014-12-12
      • 2019-08-23
      • 1970-01-01
      • 2017-09-01
      • 2013-11-29
      相关资源
      最近更新 更多