10

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
anandaravindan
  • 2,401
  • 6
  • 25
  • 35

9 Answers9

23

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

9

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.

Community
  • 1
  • 1
user3682840
  • 91
  • 1
  • 1
8
yum install bc

Then try again.

ollo
  • 24,797
  • 14
  • 106
  • 155
Blazer
  • 121
  • 2
  • 3
6

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.

vatsal
  • 3,803
  • 2
  • 19
  • 19
  • 1
    (Sorry for commenting on an old post) Worked for me as well. Running CentOs 6.4 x64 – Chris Powell Oct 17 '13 at 17:39
  • 1
    Lol, the most stupid/buried bug ever! I just reinstalled a persistently failed oracle XE without the -h flag... and run smooth! I don't know who to blame, but it's super weird – Rodrigo Jun 18 '15 at 08:02
  • 1
    Removing the progress hashing flag worked on CentOS 7 as well. Oddest error. Could be a script error on the redirection of the progress hashes (`-h, --hash`) from STDOUT or STDERR. – javafueled Mar 21 '16 at 20:37
  • You can give some bounty :P @lordvlad – vatsal Apr 13 '17 at 06:22
3

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 
bortunac
  • 4,642
  • 1
  • 32
  • 21
  • 1
    Thank you!!!! That is the solution that I've been looking for. For others: I needed also to comment the same line at file initXETemp.ora – Konki Oct 15 '18 at 18:40
2

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.

iamharish15
  • 1,760
  • 1
  • 17
  • 20
  • This has worked for me, I'm using a vps Centos 6 . The SWAP memory is granted by the vps company so I guess these files were missing. – MauricioTL Oct 12 '17 at 01:38
1

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}
limboy
  • 461
  • 5
  • 5
0

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
MonoThreaded
  • 11,429
  • 12
  • 71
  • 102
-1

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.

Megajin
  • 2,648
  • 2
  • 25
  • 44