CCL Home Page
Up Directory CCL oracle_shutdown-init.txt
#!/bin/sh

# Jan Labanowski, March, 2001, jkl@ccl.net
# Wrapper around oracle "dbshut" script 
# It is assumed that it is called either by dbora script under case "stop")
# 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 Stopping oracle...
echo ========== ORACLE shutdown: `date` ========== >>${LOG_FILE} 2>&1 
nohup $ORACLE_HOME/bin/lsnrctl stop >>${LOG_FILE} 2>&1 &
sleep 2
nohup $ORACLE_HOME/bin/dbshut >>${LOG_FILE} 2>&1 &

  

Modified: Wed Mar 14 22:19:41 2001 GMT
Page accessed 4851 times since Wed Feb 5 04:18:20 2003 GMT