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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Automatic Starup of Oracle on Sun Solaris

Re: Automatic Starup of Oracle on Sun Solaris

From: guy ruth hammond <grh_at_agency.com>
Date: Wed, 03 May 2000 13:01:20 +0100
Message-Id: <10486.104785@fatcity.com>


Benhayoune khalid wrote:
>
> Add the following line to the /etc/inittab file :
>
> orastr:2:wait:my_oracle_startup_script
>

Starting Oracle from /etc/inittab is generally a bad idea, because it means the OS takes responsibility for making sure the process is always running: this causes interesting things to happen if you ever decide to shut it down manually (for example, to patch it). Also, you probably want to start Oracle at run level 3 (full multi user mode) rather than 2 (which usually has basic networking but no applications started).

To start Oracle automatically, check that /var/opt/oracle/oratab is configured with a 'Y' then place the following lines in /etc/rc3.d/S98oracle

#!/bin/sh

# oracle server startup/shutdown script

case "$1" in
'start')

        echo "Starting Oracle database"
        su - oracle -c "source /etc/profile; ./bin/dbstart"
        echo "Starting TNS service"
        su - oracle -c "source /etc/profile; ./bin/lsnrctl start listener"
	;;

'stop')
        echo "Stopping TNS service"
        $ORACLE_HOME/bin/lsnrctl stop LISTENER
        echo "Stopping Oracle database"
        su - oracle -c 'source /etc/profile; ./bin/dbshut'

        ;;

*)
        echo "Usage: S98oracle (start|stop)"
        ;;

esac

# end

g

-- 
guy ruth hammond <grh_at_agency.com> | Happiness is a loaded weapon, and
Technology / Synergy / Consulting |   a short cut is better by far.
07879607148 http://www.agency.com |     -- The Sisters of Mercy
Received on Wed May 03 2000 - 07:01:20 CDT

Original text of this message

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