NOT RAC

You can set dbstart to autostart a single-instance database that uses an Automatic Storage Management installation that is auto-started by Oracle Clusterware. This is the default behavior for an Automatic Storage Management cluster. If you want to do this, then you must change the oratab entry of the database and the Automatic Storage Management installation to use a third field with the value W and N, respectively. These values specify that dbstart auto-starts the database only after the Automatic Storage Management instance is started.

 

Create a file called dbora, and copy the following lines into this file:

AIX /etc
Linux and Solaris /etc/init.d
HP-UX /sbin/init.d

 

Note:

Change the value of the ORACLE_HOME environment variable to an Oracle home directory for the installation.
Change the value of the ORACLE environment variable to the user name of the owner of the database installed in the Oracle home directory (typically, oracle).

 

#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
#
# 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
#

# uncomment if needed
#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
#      exit
#   fi
#fi

#
case $1 in
‘start’)
        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
#      su – $ORACLE -c $ORACLE_HOME/bin/dbstart $ORACLE_HOME & (for systems without rsh)
        ;;
‘stop’)
        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
#      su – $ORACLE -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME & (for systems without rsh)

        ;;
*)
        echo “usage: $0 {start|stop}”
        exit
        ;;
esac
#
exit

 

# chgrp dba dbora
# chmod 750 dbora

 

AIX
# ln -s /etc/dbora /etc/rc.d/rc2.d/S99dbora
# ln -s /etc/dbora /etc/rc.d/rc0.d/K01dbora
 
HP-UX
# ln -s /sbin/init.d/dbora /sbin/rc3.d/S990dbora
# ln -s /sbin/init.d/dbora /sbin/rc0.d/K001dbora
 
Linux
# 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
 
Solaris
# ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora