Ahsan Raza
Ahsan Raza

Reputation: 15

Oracle XE ( 11.2.0 ) Database Configuration failed on Ubunto 14 and 16

I am facing Error while configuring Oracle XE after installation. I Follow this Tutorial

https://askubuntu.com/questions/566734/how-to-install-oracle-11gr2-on-ubuntu-14-04

When I run this statement for database Configuration.

/etc/init.d/oracle-xe configure

I face this Error after input ports and password

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

Starting Oracle Net Listener...Done
Configuring database...

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

I guess it maybe memory Target size issue. I Tried this

nano /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora
comment # memory_target=100663296

but It won't work work for me.

Error Log.

PostDbCreation.log

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



File created.

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
ORA-00845: MEMORY_TARGET not supported on this system
select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


BEGIN utl_recomp.recomp_serial(); END;

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


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

Upvotes: 0

Views: 1770

Answers (2)

ThilankaD
ThilankaD

Reputation: 1099

Once investigated the log files prompted in the log files, was able to notice that the DB_RECOVERY_FILE_DEST desitination directory in /u01/app/oracle/product/11.2.0/xe/config/scripts/init* are not exist. So I manually created the directory.

In my case

sudo mkdir /u01/app/oracle/fast_recovery_area

This has been applied within both init.ora and initXETemp.ora. Restarted the Laptop and started the the configuration again.

/etc/init.d/oracle-xe configure

Above completed the configuration successfully for me.

Upvotes: 0

Marcin Chaj
Marcin Chaj

Reputation: 96

The best would be to start from the beginning.

Step 1 - Installation of SSH server

sudo apt install openssh-server

Step 2 - Execute the following commands (pre-requisite packages)

sudo apt-get install alien libaio1 unixodbc vim

Step 3 - Download the Oracle 11g express edition setup file from Oracle website http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html . Then go to folder where you have downloaded the setup file (rpm) and convert it to debian type (deb):

sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

Step 4 - Execute the pre-requisites, Create a special chkconfig script:

sudo vim /sbin/chkconfig

and add following into the file:

#!/bin/bash
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01

Save the above file and provide appropriate permissions

sudo chmod 755 /sbin/chkconfig

Execute the following commands:

free -m
sudo ln -s /usr/bin/awk /bin/awk
mkdir /var/lock/subsys
touch /var/lock/subsys/listener

Execute the below which prevents oracle installation errors. It is weird but helped in my case. Ignore errors that will appear.

sudo -s
umount /dev/shm
sudo rm -rf /dev/shm 
sudo mkdir /dev/shm
mount --move /run/shm /dev/shm
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm

Step 5 - Create the below file,

sudo vim /etc/rc2.d/S01shm_load

Copy content below into the opened file:

#!/bin/sh case "$1" 
in start) mkdir /var/lock/subsys 2>/dev/null 
touch /var/lock/subsys/listener 
rm /dev/shm 2>/dev/null 
mkdir /dev/shm 2>/dev/null 
mount -t tmpfs shmfs -o size=2048m /dev/shm ;;
*) echo error 
exit 1 ;; 
esac 

Execute the following command

sudo chmod 755 /etc/rc2.d/S01shm_load

Step 6 - Restart the machine.

Step 7 - Install Oracle 11gR2 XE. Go to the directory where you created the ubuntu package file and enter following commands (not as root user),

sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb

sudo /etc/init.d/oracle-xe configure

Enter the following configuration information:

Valid HTTP port for the Oracle Application Express (the default is 8080, use 7070)

Valid port for the Oracle database listener (the default is 1521)

Password for the SYS and SYSTEM administrative user accounts

Confirm password for SYS and SYSTEM administrative user accounts

Whether you want the database to start automatically when the computer starts, Y

Step 8 - Before you start using Oracle 11gR2 XE you have to set-up few things more. Change to users home directory (type cd) Open bashrc using the command

vim .bashrc

Add following lines to .bashrc :

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe 
export ORACLE_SID=XE 
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh` 
export ORACLE_BASE=/u01/app/oracle 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH 
export PATH=$ORACLE_HOME/bin:$PATH 

Execute .profile to load the changes:

. ./.profile

Open root bash using

sudo vim /root/.bashrc 

and copy the same contents at the end of that file

Step 9 - Restart the appliance. Oracle should have been started now

Step 10 - Execute the following command to enter SQL prompt

sqlplus sys as sysdba

Upvotes: 1

Related Questions