Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Script /etc/init.d/oracle-xe won't start database in manual mode

463996Nov 1 2005
When you don´t want the Oracle XE database to do an automatic startup on linux, the file /etc/sysconfig/oracle-xe-config contains the following line:

ORACLE_DBENABLED=false

However, in the /etc/init.d/oracle-xe script, there is a verification of this value before the initialization of the listener and the database. Because it is false, the routine leaves, and nothing happens.

The listener and the database can be started manually with lsnrctl and sqlplus, but the script will not work. The code of the script is:

start() {

if test ! -f /etc/sysconfig/oracle-xe-config
then
echo You need to configure Oracle Database 10g Express Edition before\
you can start it.
exit 0
elif [ "$CONFIGURE_RUN" != "true" ]
then
echo You need to configure Oracle Database 10g Express Edition before\
you can start it.
exit 0
fi
------------------------------------------------------
This code will make the script to stop

if [ "$ORACLE_DBENABLED" != "true" ]
then
exit 0
fi
------------------------------------------------------
status=`ps -ef | grep tns | grep oraclexe`
if [ "$status" == "" ]
then
if [ -f $ORACLE_HOME/bin/tnslsnr ]
then
echo "Starting Oracle Net Listener."
$SU $ORACLE_OWNER -c "$LSNR start" > /dev/null 2>&1
fi
fi
echo "Starting Oracle Database 10g Express Edition Instance."
$SU $ORACLE_OWNER -c "$SQLPLUS -s /nolog @$ORACLE_HOME/config/scripts/startdb.sql" > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
echo
else
echo Failed to start Oracle Net Listener using $ORACLE_HOME/bin/tnslsnr\
and Oracle Express Database using $ORACLE_HOME/bin/sqlplus.
RETVAL=1
fi
return $RETVAL
}

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 29 2005
Added on Nov 1 2005
0 comments
338 views