Oracle XE 数据库配置失败

问题描述 投票:0回答:9

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

VPS 操作系统:Cent OS.

尝试运行时

/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
9个回答
23
投票

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


9
投票

我有同样的问题。

我卸载了oracle-xe。请参阅如何在 Linux 上重新配置 Oracle 10g xe

然后跟着

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

一切顺利。


8
投票
yum install bc

然后再试一次。


6
投票

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

最初我使用了命令

$rpm -ivh oracle-xe.rpm

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

之后我尝试了

$rpm -i oracle-xe.rpm 

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


3
投票

对于 debian ... 如何从 rpm 安装 oracle-XE

配置数据库... 数据库配置失败。查看 /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 

2
投票

我在 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

我已经测试过了,完美无缺。


1
投票

在谷歌搜索“oracle sucks”后,我设法解决了导致配置在运行 Hortonworks HDP 2.6 沙箱的 docker 容器上失败的问题:

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

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}

0
投票

因为这个页面上的其他答案都不适合我(Ubuntu),所以为此浪费了一整天。
这里

的正确说明 其他教程中缺少的主要技巧是执行

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

之前

/etc/init.d/oracle-xe configure

0
投票

{IDS_OracleConfigDlg_DatabaseConfigFailedMsg} 配置 Oracle XE 数据库时出错。检查 C:pp\ACER\product 的日志

© www.soinside.com 2019 - 2024. All rights reserved.