# oracle database startup script
# chkconfig: 2345 10 90
# description: starts and stops the Oracle database
# Since this script runs from root
# the ORA_HOME and ORA_OWNER must be set
# "su -" to the oracle owner account to be sure the
# environment is set
ORA_HOME=/u01/oracle/ora920
ORA_OWNER=oracle
case "$1" in
'start')
ulimit -u 16384
/bin/su - $ORA_OWNER -c "lsnrctl start LISTENER"
/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl start"
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl start oms"
# create /var/lock/subsys/oracle to make sure the oracle stop command runs
touch /var/lock/subsys/oracle
;;
'stop')
/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/oemctl stop oms sysman/oracle"
#/bin/su - $ORA_OWNER -c "$ORA_HOME/bin/agentctl stop"
/bin/su - $ORA_OWNER -c "lsnrctl stop LISTENER"
/bin/su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
没有评论:
发表评论