#!/bin/bash
#
# chkconfig: - 90 10
# description: Starts and stops the Oracle database and listeners
#
# Source function library.
. /etc/rc.d/init.d/functions
#
# chkconfig: - 90 10
# description: Starts and stops the Oracle database and listeners
#
# Source function library.
. /etc/rc.d/init.d/functions
export ORACLE_HOME=/oracle/10g/db1
start() {
su - oracle -c "dbstart $ORACLE_HOME"
su - oracle -c "dbstart $ORACLE_HOME"
touch /var/lock/subsys/oracle
}
}
stop() {
su - oracle -c "dbshut $ORACLE_HOME"
rm -f /var/lock/subsys/oracle
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: oracle {start|stop|restart}"
exit 1
esac
rm -f /var/lock/subsys/oracle
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: oracle {start|stop|restart}"
exit 1
esac
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/611609/viewspace-683649/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/611609/viewspace-683649/