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: How to ensure Listener starts when Unix box reboots?

Re: How to ensure Listener starts when Unix box reboots?

From: Theo <theo.horn_at_za.unisys.com>
Date: Sat, 24 Jul 1999 01:02:32 GMT
Message-ID: <7nb3b5$2rs$1@nnrp1.deja.com>


In article <Httl3.824$HF.27645_at_dfiatx1-snr1.gtei.net>,   "Christopher Allen" <progplusSPAMBEGONE_at_gte.net> wrote:
> Thanks for the reply, and for detailing the components of the
answer. It
> looks like I need one more piece of information, because there's no
single
> /etc/rc file, and within the /etc/rc* directories, there are many
files,
> none of which is an obvious candidate. What follows is a listing of
those
> directories; if you wouldn't mind giving them a lookover and pointing
to any
> file that is an obvious condidate, I'd appreciate it.
>
> Thanks,
> Christopher

OK, here is my file. I keep it in /etc/rc2.d/S90Oracle and linked it to /etc/rc0.d/K30Oracle. The numbering (S90*) is just so it starts AFTER all the network stuff and K30* so it stops BEFORE all the network stuff. One point to note though, is to make sure nobody is connected to the DB on shutdown otherwise the UNIX box will not shutdown. Oracle 8i apparently has SHUTDOWN TRANSACTIONAL which will be a godsend. Here is the file...

# /etc/rc2.d/S90Oracle linked to /etc/rc0.d/K30Oracle

case $1 in

        start)
        echo "Starting Oracle 8 ..."
        su - oracle -c 'dbstart'
        su - oracle -c 'lsnrctl start'
        ;;
        stop)
        echo "Stopping Oracle 8 ..."
        su - oracle -c 'lsnrctl stop'
        su - oracle -c 'dbshut'
        ;;

esac

UNIX calls all the S* scripts in /etc/rc2.d with the start parameter when it starts up and all the K* scripts in /etc/rc0.d with the stop parameter.

I hope this helps! (Do we have to type this? :-)) Theo

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Jul 23 1999 - 20:02:32 CDT

Original text of this message

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