Created
April 29, 2013 15:51
-
-
Save jgnagy/5482519 to your computer and use it in GitHub Desktop.
DB2 stopping, round II
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
stop() { | |
echo -n $"Stopping $prog: " | |
dprofile || failure | |
db2gcf -s 1>>${DB2LOG} 2>&1 | |
RETVAL=$? | |
if [ $RETVAL -gt 0 ]; then | |
echo -n $"${prog} is already stopped" | |
failure | |
RETVAL=3 | |
echo "" | |
else | |
db2 terminate 1>>${DB2LOG} 2>&1 | |
db2 force applications all 1>>${DB2LOG} 2>&1 | |
db2stop 1>>${DB2LOG} 2>&1 && success | |
RETVAL=$? | |
if [ $RETVAL -gt 0 ]; then | |
db2stop force 1>>${DB2LOG} 2>&1 && success || failure | |
fi | |
echo "" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment