database Oracle XE 数据库配置失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18028942/
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
Oracle XE Database Configuration failed
提问by anandaravindan
I am trying to create an oracle xe database in my vps.
我正在尝试在我的 vps 中创建一个 oracle xe 数据库。
VPS OS : Cent OS.
VPS 操作系统:Cent 操作系统。
When try to run
尝试运行时
/etc/init.d/oracle-xe configure
it throws an error Database confiration failed and to check the logs but logs just shows ORA-01034: ORACLE not available
它引发错误数据库确认失败并检查日志但日志仅显示 ORA-01034:ORACLE 不可用
Below is the history...
下面是历史...
[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
回答by Jorge Cornejo Bellido
Add your servers name and IP to the /etc/hosts file
将您的服务器名称和 IP 添加到 /etc/hosts 文件中
回答by Blazer
yum install bc
Then try again.
然后再试一次。
回答by user3682840
I had same issues.
我有同样的问题。
I uninstalled oracle-xe. See How to reconfigure Oracle 10g xe on Linux
我卸载了 oracle-xe。请参阅如何在 Linux 上重新配置 Oracle 10g xe
Then followed
然后跟着
yum install bc
rpm -i oracle-xe.rpm
/etc/init.d/oracle-xe configure
Everything went fine.
一切顺利。
回答by vatsal
Ok the solution may sound weird but today i got the exactly same error while installing Oracle Xe on centos. I struggled a lot to find the answer but in the end the problem was the way i was installing the rpm.
好的,解决方案可能听起来很奇怪,但今天我在 centos 上安装 Oracle Xe 时遇到了完全相同的错误。我费了很大劲才找到答案,但最终问题出在我安装 rpm 的方式上。
Initailly i used the command
最初我使用了命令
$rpm -ivh oracle-xe.rpm
and somehow it was giving the same error which you are getting.
不知何故,它给出了与您相同的错误。
After that i tried
之后我试过了
$rpm -i oracle-xe.rpm
and it worked for me. Not very sure why will the "h" flag, which is the hash flag cause an issue but it worked for me.
它对我有用。不太确定为什么“h”标志会导致问题,但它对我有用。
回答by bortunac
for debian ... how to install oracle-XE from rpm
对于 debian ...如何从 rpm 安装 oracle-XE
Configuring database... Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
正在配置数据库... 数据库配置失败。查看 /u01/app/oracle/product/11.2.0/xe/config/log 了解详细信息
nano /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora
comment # memory_target=100663296
评论 # memory_target=100663296
/etc/init.d/oracle-xe configure // will work
回答by iamharish15
I too faced the similar issue on Linux Mint 17.3. Fortunately, I found the solution sooner. The issue is simply that your shared memory file is not where Oracle expects it to be i.e. /dev/shm but you'd be having it at /run/shm with /dev/shm linking to it.
我在 Linux Mint 17.3 上也遇到了类似的问题。幸运的是,我早点找到了解决方案。问题很简单,您的共享内存文件不是 Oracle 预期的位置,即 /dev/shm,但您将在 /run/shm 中使用它,/dev/shm 链接到它。
So, to resolve this issue, before configuring the database, you must perform the below steps in order
因此,要解决此问题,在配置数据库之前,您必须按顺序执行以下步骤
$ sudo rm -rf /dev/shm
$ sudo mkdir /dev/shm
$ sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
I have tested it, works perfect.
我已经测试过了,完美运行。
回答by limboy
After googling 'oracle sucks' in frustration over the lack of logging from the installation I managed to resolve the issue that caused the configuration to fail on a docker container running the Hortonworks HDP 2.6 Sandbox:
在谷歌搜索“oraclesucks”后,由于安装中缺少日志记录而感到沮丧,我设法解决了导致配置在运行 Hortonworks HDP 2.6 Sandbox 的 docker 容器上失败的问题:
Oracle XE requires 1 Gb of shared memory and fails otherwise (I didn't try 512 mb) according to https://blogs.oracle.com/oraclewebcentersuite/implement-oracle-database-xe-as-docker-containers.
根据https://blogs.oracle.com/oraclewebcentersuite/implement-oracle-database-xe-as-docker-containers,OracleXE 需要 1 Gb 共享内存,否则会失败(我没有尝试 512 mb)。
vi /etc/fstab
change/add the line to:
将行更改/添加到:
tmpfs /dev/shm tmpfs defaults,size=1024m 0 0
Then reload the configuration by:
然后通过以下方式重新加载配置:
mount -a
Keep in mind that if you later restart the docker container you might have to do 'mount -a' once more as it starts with the default set on the container ~ 65 mb.
请记住,如果您稍后重新启动 docker 容器,您可能需要再次执行 'mount -a',因为它以容器上的默认设置开始 ~ 65 mb。
Normally the failed configuration will have succeeded in creating a listener and you will have to kill this before rerunning configuration.
通常,失败的配置会成功创建侦听器,您必须在重新运行配置之前终止它。
ps -aux | grep tnslsnr
kill {process identified in the step above}
回答by MonoThreaded
Lost a full day to this one as none of the other answers on this page worked for me (Ubuntu).
Proper instructions where here
The main trick missing from other tutorials was to execute
由于此页面上的其他答案都不适用于我(Ubuntu),因此为此浪费了整整一天。此处的
正确说明其他教程中缺少的主要技巧是执行
sed -i 's,/var/lock/subsys,/var/lock,' /etc/init.d/oracle-xe
before
前
/etc/init.d/oracle-xe configure
回答by Siddharth Singh Bisht
check the permissions for: /u01/
检查以下权限: /u01/
In my case these were set to root:rootI changed this to oracle:dbaand it worked for me.
在我的情况下,这些设置为root:root我将其更改为oracle:dba,它对我有用。
But before that I tried the following:
但在此之前,我尝试了以下操作:
- Setting up the
IP/hostnamein the/etc/hosts - installing bc and reinstalling oracle
- 设置
IP/hostname在/etc/hosts - 安装 bc 并重新安装 oracle
both the steps did not work for me but I uninstalled and reinstalled oracle-xe, changed permissions and then ran the command for configure.
这两个步骤对我都不起作用,但我卸载并重新安装了 oracle-xe,更改了权限,然后运行了配置命令。

