Oracle XE Database Configuration failed

别等时光非礼了梦想. 提交于 2019-11-29 13:59:53

问题


I am trying to create an oracle xe database in my vps.

VPS OS : Cent OS.

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

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

回答1:


Add your servers name and IP to the /etc/hosts file




回答2:


yum install bc

Then try again.




回答3:


I had same issues.

I uninstalled oracle-xe. See How to reconfigure Oracle 10g xe on Linux

Then followed

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

Everything went fine.




回答4:


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.

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.




回答5:


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.

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.




回答6:


for debian ... how to install oracle-XE from rpm

Configuring database... Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

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

comment # memory_target=100663296

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



回答7:


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:

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.

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.

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}



回答8:


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

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

before

/etc/init.d/oracle-xe configure



回答9:


check the permissions for: /u01/

In my case these were set to root:root I changed this to oracle:dba and it worked for me.

But before that I tried the following:

  1. Setting up the IP/hostname in the /etc/hosts
  2. installing bc and reinstalling 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.



来源:https://stackoverflow.com/questions/18028942/oracle-xe-database-configuration-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!