# !/bin/sh # # chkconfig: 345 51 49 # description: starts the oracle dabase deamons ( part of the aD ACS install ) # # Set ORA_HOME to be equivalent to the ORACLE_HOME # from which you wish to execute dbstart and dbshut # Set ORA_OWNER to the user id of the owner of the Oracle database in # ORA_HOME ORA_HOME=/ora01/app/oracle/product/8.1.7 ORA_OWNER=oracle # if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] # then # echo "Oracle startup: cannot start" # exit # fi case "$1" in 'start') # Start the Oracle databases: # The following command assumes that the oracle login will not # prompt the user for any values. echo -n "Starting Oracle8i: " su - $ORA_OWNER -c $ORA_HOME/bin/dbstart touch /var/lock/subsys/oracle8i echo ;; 'stop') # Stop the Oracle databases: # The following command assumes that the oracle login will not # prompt the user for any values. echo -n "Shutting down Oracle8i: " su - $ORA_OWNER -c $ORA_HOME/bin/dbshut rm -f /var/lock/subsys/oracle8i echo ;; 'restart') # Restart the Oracle databases: echo -n "Restarting Oracle8i: " $0 stop $0 start echo ;; *) echo "Usage: oracle8i { start | stop | restart }" exit 1 esac exit 0