Kbase 15021: Sample script using proshut -F to workaround proshut hang
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Sample script using proshut -F to workaround proshut hang
Sample script using proshut -F to workaround proshut hang
#!/bin/sh
# SHUTDB
# A sample UNIX script to shutdown a database.
# Usage: shutdb dbname
# Make sure syntax is correct
: ${1?"Usage: $0 dbname"}
dbname=$1
# Create the logging file
echo "Shut $dbname at 'date'" > shut.log
# start the proshut in the background
# be sure to put the & at the end of the proshut command
proshut $dbname -by >> shut.log 2>&1 &
# wait 15 Minutes or 900 seconds
sleep 900
# if the .lk is removed, shutdown complete
if [ ! -f $dbname.lk ]
then
echo Database shut 'date' >> shut.log
exit
fi
# if we got this far, perform force shutdown
proshut $dbname -by -F >> shut.log
echo Emergency shut 'date' >> shut.log
Progress Software Technical Support Note # 15021