CCL Home Page
Up Directory CCL dbora-init.txt
#!/bin/sh
#
# dbora   This scripts starts and shuts down the oracle databas
#
# chkconfig: 345 99 10
# description: This script calls the dbstart script to start Oracle
#              and dbshut to stop it
# processname: oracle*
# config: /etc/oratab
#                                                                               
# Source function library.
. /etc/rc.d/init.d/functions

ORA_HOME=/u01/app/oracle/product/8.1.7.0.1
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]; then
  echo Sorry... the $ORA_HOME/bin/dbstart script is missing
  echo Cannot start Oracle
  exit
fi
if [ ! -f $ORA_HOME/bin/oracle_startup ]; then
  echo Sorry... the $ORA_HOME/bin/oracle_startup script is missing
  echo Cannot start Oracle
  exit
fi

case "$1" in

'start')
        su - $ORA_OWNER -c $ORA_HOME/bin/oracle_startup
        ;;

'stop')
        su - $ORA_OWNER -c $ORA_HOME/bin/oracle_shutdown
        ;;
esac

Modified: Wed Mar 14 22:50:15 2001 GMT
Page accessed 5942 times since Wed Feb 5 05:26:05 2003 GMT