Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Autostarting Oracle 8.0.5 for Linux

Re: Autostarting Oracle 8.0.5 for Linux

From: Craig Kelley <ink_at_inconnu.isu.edu>
Date: 2000/03/17
Message-ID: <m1ityl468s.fsf@inconnu.isu.edu>#1/1

Greg Akins <gakinsNOgaSPAM_at_gatewayhealthplan.com.invalid> writes:

> I had asked this before and got a nod towards a Debian linux
> package. However, I'm not running Debian (Redhat5.2)
>
> I followed the Oracle Post-installation documentation. Which
> meant creating a dbora with startup info and linking that file
> to the following...
>
> # ln -s /etc/rc.d/init.d/dbora /etc/rc0.d/K10dbora
> # ln -s /etc/rc.d/init.d/dbora /etc/rc2.d/S99dbora
>
> Unfortunately it doesn't see to be executing the shell (I put
> echo "bla, bla, bla" in the first line and I never see that.
>
> I'm pretty new to *nix and don't really understand the startup
> path. Could somebody help clear this up for me.

You probably don't have the init file in /etc/rc.d/init.d

I use this one (this one assumes your UNIX username for the oracle system is 'oracle' and that that user's profile will correctly setup ORACLE_BASE, ORACLE_HOME, PATH, etc. -- it also starts up the listener for network connections):

#!/bin/sh

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)

        echo -n "Starting Oracle: "
        su - oracle -c dbstart
        su - oracle -c 'lsnrctl start'
        echo
        touch /var/lock/subsys/oracle
        ;;
  stop)
        echo -n "Shutting down Oracle: "
        su - oracle -c 'lsnrctl stop'
        su - oracle -c dbshut
        echo
        rm -f /var/lock/subsys/oracle
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1

esac

exit 0

-- 
The wheel is turning but the hamster is dead.
Craig Kelley  -- kellcrai_at_isu.edu
http://www.isu.edu/~kellcrai finger ink@inconnu.isu.edu for PGP block
Received on Fri Mar 17 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US