【问题标题】:Oracle XE Database Configuration failedOracle XE 数据库配置失败
【发布时间】:2013-08-04 10:26:52
【问题描述】:

我正在尝试在我的 vps 中创建一个 oracle xe 数据库。

VPS 操作系统:Cent 操作系统。

尝试运行时

/etc/init.d/oracle-xe configure

它抛出一个错误数据库确认失败并检查日志但日志只显示 ORA-01034: ORACLE 不可用

下面是历史...

[root@vmcx-43 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing...                ########################################### [100%]
/var/tmp/rpm-tmp.51363: line 186: bc: command not found
   1:oracle-xe              /var/tmp/rpm-tmp.51363: line 186: bc: command not fo                                        und########################################### [100%]
Executing post-install steps...

/var/tmp/rpm-tmp.97984: line 76: bc: command not found
/var/tmp/rpm-tmp.97984: line 77: bc: command not found
/var/tmp/rpm-tmp.97984: line 78: [: -gt: unary operator expected
/var/tmp/rpm-tmp.97984: line 82: bc: command not found

You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

[root@vmcx-43 Disk1]# /etc/init.d/oracle-xe configure

Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition.  The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts.  Press <Enter> to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Password can't be null. Enter password:
Password can't be null. Enter password:
Confirm the password:

Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: n

Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed.  Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

[root@vmcx-43 Disk1]# cd /u01/app/oracle/product/11.2.0/xe/config/log
[root@vmcx-43 log]# ls
CloneRmanRestore.log  cloneDBCreation.log  postDBCreation.log  postScripts.log

[root@vmcx-43 log]# tail postScripts.log


commit
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


[root@vmcx-43 log]# tail CloneRmanRestore.log


select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

【问题讨论】:

    标签: database oracle11g vps oracle-xe


    【解决方案1】:

    将您的服务器名称和 IP 添加到 /etc/hosts 文件中

    【讨论】:

      【解决方案2】:

      我也有同样的问题。

      我卸载了 oracle-xe。见How to reconfigure Oracle 10g xe on Linux

      然后跟着

      yum install bc
      rpm -i oracle-xe.rpm
      /etc/init.d/oracle-xe configure
      

      一切顺利。

      【讨论】:

      • 在 CentOS 6.5 上无法使用 WebServer 类型配置
      【解决方案3】:
      yum install bc
      

      然后再试一次。

      【讨论】:

        【解决方案4】:

        好的,这个解决方案可能听起来很奇怪,但是今天我在 centos 上安装 Oracle Xe 时遇到了完全相同的错误。我费了很大劲才找到答案,但最终问题出在我安装 rpm 的方式上。

        最初我使用了命令

        $rpm -ivh oracle-xe.rpm
        

        不知何故,它给出了与您得到的相同的错误。

        之后我尝试了

        $rpm -i oracle-xe.rpm 
        

        它对我有用。不太清楚为什么“h”标志(哈希标志)会导致问题,但它对我有用。

        【讨论】:

        • (抱歉对旧帖子发表评论)也为我工作。运行 CentOs 6.4 x64
        • 大声笑,有史以来最愚蠢/最埋没的虫子!我刚刚重新安装了一个没有 -h 标志的持续失败的 oracle XE ......并且运行顺利!我不知道该怪谁,但这太奇怪了
        • 在 CentOS 7 上也可以移除进度散列标记。最奇怪的错误。可能是从 STDOUT 或 STDERR 重定向进度哈希 (-h, --hash) 时出现脚本错误。
        • 你可以提供一些赏金:P @lordvlad
        【解决方案5】:

        对于 debian ...how to install oracle-XE from rpm

        正在配置数据库... 数据库配置失败。查看 /u01/app/oracle/product/11.2.0/xe/config/log 了解详情

        nano /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora
        

        评论# memory_target=100663296

        /etc/init.d/oracle-xe configure // will work 
        

        【讨论】:

        • 谢谢!!!!这就是我一直在寻找的解决方案。对于其他人:我还需要在文件 initXETemp.ora 中注释同一行
        【解决方案6】:

        我在 Linux Mint 17.3 上也遇到了类似的问题。幸运的是,我很快找到了解决方案。问题很简单,您的共享内存文件不在 Oracle 期望的位置,即 /dev/shm,但您将在 /run/shm 中拥有它,而 /dev/shm 链接到它。

        所以,要解决这个问题,在配置数据库之前,您必须按顺序执行以下步骤

        $ sudo rm -rf /dev/shm
        $ sudo mkdir /dev/shm
        $ sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
        

        我已经测试过了,效果很好。

        【讨论】:

        • 这对我有用,我正在使用 vps Centos 6 。 SWAP内存是vps公司授予的,所以我猜这些文件丢失了。
        【解决方案7】:

        在谷歌搜索“oracle 糟透了”后,我对安装中缺少日志记录感到沮丧,我设法解决了导致在运行 Hortonworks HDP 2.6 沙盒的 docker 容器上配置失败的问题:

        根据https://blogs.oracle.com/oraclewebcentersuite/implement-oracle-database-xe-as-docker-containers,Oracle XE 需要 1 Gb 的共享内存,否则会失败(我没有尝试 512 mb)。

        vi /etc/fstab
        

        更改/添加行到:

        tmpfs    /dev/shm     tmpfs   defaults,size=1024m 0 0
        

        然后通过以下方式重新加载配置:

        mount -a
        

        请记住,如果您稍后重新启动 docker 容器,您可能需要再次执行“mount -a”,因为它从容器上的默认设置开始 ~ 65 mb。

        通常,失败的配置会成功创建监听器,您必须在重新运行配置之前将其终止。

        ps -aux | grep tnslsnr
        kill {process identified in the step above}
        

        【讨论】:

          【解决方案8】:

          因为这个页面上的其他答案都没有对我有用(Ubuntu),所以花了一整天的时间。
          here

          其他教程中缺少的主要技巧是执行

          sed -i 's,/var/lock/subsys,/var/lock,' /etc/init.d/oracle-xe
          

          之前

          /etc/init.d/oracle-xe configure
          

          【讨论】:

            【解决方案9】:

            检查权限:/u01/

            在我的情况下,这些设置为root:root,我将其更改为oracle:dba,它对我有用。

            但在此之前我尝试了以下方法:

            1. /etc/hosts 中设置IP/hostname
            2. 安装 bc 并重新安装 oracle

            这两个步骤都对我不起作用,但我卸载并重新安装了 oracle-xe,更改了权限,然后运行了配置命令。

            【讨论】:

            • 感谢@Megajin 格式化。我是stackoverflow的新手。将在未来保持这一点。
            猜你喜欢
            • 2019-01-30
            • 2017-11-07
            • 2021-10-20
            • 1970-01-01
            • 2016-04-26
            • 2022-01-11
            • 2023-03-19
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多