Skip to Main Content

Oracle Database Discussions

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!

How to automatically startup Oracle on SUSE Linux

sljavaAug 9 2013 — edited Aug 9 2013

I have Oracle 11g installed on a server running SUSE Linux 11. I followed the official Oracle instructions to try to set up Oracle for automatic startup.

My /etc/oratab file contains the following:

sidname:/opt/oracle/product/11gR2/db:Y

I created a /etc/init.d/dbora file, which contains the following:

#! /bin/sh  -x

#

# Change the value of ORACLE_HOME to specify the correct Oracle home

# directory for your installation.

ORACLE_HOME=/opt/oracle/product/11gR2/db

#

# Change the value of ORACLE to the login name of the

# oracle owner at your site.

#

ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin

HOST=`hostname`

PLATFORM=`uname`

export ORACLE_HOME PATH

#

if [ ! "$2" = "ORA_DB" ] ; then

   if [ "$PLATFORM" = "HP-UX" ] ; then

      remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"

      exit

   else

      rsh $HOST -l $ORACLE  $0 $1 ORA_DB

      if [ "$PLATFORM" = "Linux" ] ; then

          touch /var/lock/subsys/dbora

      fi

      exit

   fi

fi

#

case $1 in

'start')

        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &

        ;;

'stop')

        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &

        ;;

*)

        echo "usage: $0 {start|stop}"

        exit

        ;;

esac

#

exit

Then I ran the following commands:

chgrp dba /etc/init.d/dbora

chmod 750 /etc/init.d/dbora

ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora

ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora

ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora

shutdown -r now

After restarting, Oracle was not running:

server:~ # ps -fea | grep ora

root      2681  2563  0 21:18 ?        00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled

root      2688  2563  0 21:18 ?        00:00:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)

root      4491  4333  0 21:19 pts/1    00:00:00 grep ora

server:~ # ps -fea | grep lsnr

root      4493  4333  0 21:19 pts/1    00:00:00 grep lsnr

Oracle runs fine after I start the instance (by logging into sqlplus as "sys as sysdba" and issuing the "startup" command) and listener. But it won't start up automatically after restarting the server. Why is that?

This post has been answered by sljava on Aug 9 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2013
Added on Aug 9 2013
5 comments
3,636 views