Salesforce

Using PROUTIL BUSY to determine if a database is in use.

« Go Back

Information

 
TitleUsing PROUTIL BUSY to determine if a database is in use.
URL NameP43260
Article Number000148390
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
Using PROUTIL BUSY to determine if a database is in use.
How to find out if a database is in use?
What is the PROUTIL BUSYqualifier?
What are the Return Codes from PROUTIL BUSY
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
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 busy

Where:
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

 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:37 AM

Powered by