#!/bin/sh # edit the oracle home and user to your needs # ORACLE_HOME="/opt/oracle/product/12.1.0.2/dbhome_1" #set the Listner Home ORACLE_HOME_LISTNER=$ORACLE_HOME ############################# #dbstart exists? if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ] then echo "Oracle startup: cannot start" exit 1 fi ############################# # Datenbank starten oder stoppen case "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " $ORACLE_HOME/bin/dbstart $ORACLE_HOME_LISTNER #touch /var/lock/subsys/oracle echo "OK" ;; stop) # Oracle listener and instance shutdown echo -n "Shutdown Oracle: " $ORACLE_HOME/bin/dbshut $ORACLE_HOME_LISTNER #rm -f /var/lock/subsys/oracle echo "OK" ;; reload|restart) $0 stop $0 start ;; *) echo "Usage: $0 start|stop|restart|reload" exit 1 esac exit 0