#!/bin/sh
# Jan Labanowski, March, 2001, jkl@ccl.net
# Wrapper around oracle "dbstart" script
# It is assumed that it is called either by dbora script under case "start")
# as, e.g., shown here
#
# case "$1" in
# 'start')
# su - oracle -c "$ORACLE_HOME/bin/oracle_startup"
# ;;
# 'stop')
# su - oracle -c "$ORACLE_HOME/bin/oracle_shutdown"
# ;;
# esac
#
#
# or it called by dully logged in (i.e., it is assumed that .bashrc
# and .bash_profile scripts were executed) user oracle.
# In other words, it is expected that all needed environmental varialbes
# like ORACLE_HOME, ORACLE_BASE, JAVA_HOME, CLASSPATH, LD_LIBRARY_PATH,
# PATH, etc., are set correctly. It is also assumed that the directory
# ${ORACLE_HOME}/logs exists and is writable by user "oracle" who runs
# oracle.
#
LOG_FILE=${ORACLE_HOME}/logs/oracle_on_off.log
echo Starting oracle...
echo ========== ORACLE startup: `date` ========== >>${LOG_FILE} 2>&1
echo Initial environment at startup: >>${LOG_FILE} 2>&1
env >>${LOG_FILE} 2>&1
nohup $ORACLE_HOME/bin/lsnrctl start >>${LOG_FILE} 2>&1 &
sleep 2
nohup $ORACLE_HOME/bin/dbstart >>${LOG_FILE} 2>&1 &
|