The PROUTIL BUSY Qualifier determines whether the database is currently in use. This information is useful before performing a database backup or shutting down a database. A database is in use if it is being used in single-user mode, multi-user mode, or by a Progress utility (PROSTRCT, PROUTIL, etc).
SYNTAX:
proutil <dbname> -C busyWhere:
dbname specifies the name of the database.
When the PROUTIL command with the BUSY qualifier completes, test the command return code in a UNIX script or Windows batch file.
Return Codes for the PROUTIL BUSY qualifier:
0 Database is not in use.
6 Database is in use.
64 Database is in process of starting up.
Example: Using the BUSY qualifier in a UNIX script that tests whether the database is busy prior to performing a database backup:
proutil mydb -C busy
if [ $? != 0 ]
then
echo
echo "Do you want to use 'proshut' to force users off the system?"
read ans
if [ "$ans" = y ]
then
proshut -byF mydb
else
echo "Offline Backup will not be performed."
exit
fi
fi
echo "Beginning backup."
# Backup procedure