Startup Oracle instance at boot time (Oracle 10g on Suse Linux 10.2)
Dear Oracle expoerts,
I have a problem with starting an Oracle 10g R2 database on Suse Linux 10.2 at boot time.
I created a boot-script (see below) and this boot script works perfectly if I call it with
/etc/init.d/oracle start as root user.
But during boot-up of the system it doen't work.
I placed links to
/etc/rc3.d/S99oracle
and
/etc/rc3.d/K01oracle
As you can see in my script I also wrote all calls for my start option to be autonomous from
Environment-variables since during my desperate tries to boot the database I thought that I had a problem with my
environment variables.
Now I can't find any reason why the skript belkow shouldn't work at boot time.
I'm happy for any help.
Best regards,
Daniel
#! /bin/sh -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1
ORACLE=oracle # user der Oracle Datenbank besitzt
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
case "$1" in
start)
/home/oracle/oracle/product/10.2.0/db_1/bin/lsnrctl start
echo "Listener started"
su oracle -c /home/oracle/oracle/product/10.2.0/db_1/bin/emctl start dbconsole
echo "EM started...."
/home/oracle/oracle/product/10.2.0/db_1/bin/dbstart $ORACLE_HOME
echo "dbstart invoked..."
su oracle -c "/home/oracle/oracle/product/10.2.0/db_1/bin/sqlplus -S / as SYSDBA @/home/oracle/Systemskripte/startupDB.sql" &
;;
stop)
su oracle -c $ORACLE_HOME/bin/lsnrctl stop &
su oracle -c $ORACLE_HOME/bin/emctl stop dbconsole &
su oracle -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit