分类:
2010-05-26 14:50:33
echo "Check whethere the file exists or not"
if [ ! -f '$ORACLE_LOCN/lsnrctl' -o ! -d $ORACLE_LOCN ]; then
echo "Unable to Start the Oracle Service"
fi
case "$1" in
start)
echo "Starting up Oracle Database and Listener Service"
su - $ORACLE_OWNR -c "$ORACLE_LOCN/dbstart"
su - $ORACLE_OWNR -c "$ORACLE_LOCN/lsnrctl start"
touch /var/log/oracle
;;
stop)
echo "Stoping Oracle Database and Listener Service"
su - $ORACLE_OWNR -c "$ORACLE_LOCN/dbshut"
su - $ORACLE_OWNR -c "$ORACLE_LOCN/lsnrctl stop"
touch /var/log/oracle
;;
restart|reload)
echo "Restarting Oracle Database and Listener Service"
$0 stop
$0 start
;;
*)
echo "Usuage Oracle start|stop|restart|reload"
exit 1
esac
exit 0