Created
September 7, 2011 19:43
-
-
Save wstrange/1201519 to your computer and use it in GitHub Desktop.
Oracle startup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# oracle Init file for starting and stopping | |
# Oracle Database. Script is valid for 10g and 11g versions. | |
# | |
# chkconfig: 35 80 30 | |
# description: Oracle Database startup script | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
ORACLE_OWNER="oracle" | |
ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1/ | |
case "$1" in | |
start) | |
echo -n $"Starting Oracle DB:" | |
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" | |
echo "OK" | |
;; | |
stop) | |
echo -n $"Stopping Oracle DB:" | |
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" | |
echo "OK" | |
;; | |
*) | |
echo $"Usage: $0 {start|stop}" | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment