All pastes #191822 Raw Edit

waKKu - oracle

public shellscript v1 · immutable
·published 2006-10-05 12:13 UTC
rendered paste body
#!/bin/bash# chkconfig: 345 91 19# description: Startup/Shutdown Oracle listener and instanceORA_OWNR="oracle"ORA_HOME="/opt/oracle/app/oracle/product/10.2.0/db_1"ORA_SID="asteca"export ORA_SIDcase "$1" instart)        echo -n "Starting Oracle Database: "        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"        su - $ORA_OWNR -c $ORA_HOME/bin/dbstart        su - $ORA_OWNR -c "$ORA_HOME/bin/isqlplusctl start"        su - $ORA_OWNR -c "$ORA_HOME/bin/emctl start dbconsole"        touch /var/lock/subsys/oracle;;stop)        echo -n "Shutting Down Oracle: "        su - $ORA_OWNR -c "$ORA_HOME/bin/emctl stop dbconsole"        su - $ORA_OWNR -c "$ORA_HOME/bin/isqlplusctl stop"        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"        su - $ORA_OWNR -c $ORA_HOME/bin/dbshut        rm -f /var/lock/subsys/oracle;;reload|restart)        $0 stop        $0 start;;*)        echo -e "\nUse: $0 start|stop|restart|reload\n"        exit 1esacexit 0