Try OpenEdge Now
skip to main content
Database Administration
Reference : PROUTIL Utility : PROUTIL HOLDER qualifier
 

PROUTIL HOLDER qualifier

Determines whether the database currently in use is in single-user mode, multi-user mode, or in use by a utility.
proutil db-name -C holder

Parameters

db-name
Specifies the database you are using.

Notes

*When the HOLDER qualifier completes, it sets a return code that you can test in a UNIX script or Windows batch file. This information is useful to obtain before performing a database backup or shutting down a database. The return codes for the HOLDER qualifier on UNIX are shown in the following table:
Return code
Description
0
The database is not in use
14
The Database is locked by single user, PROUTIL, or RFUTIL
16
The database is open in multi-user mode
Any other nonzero return code indicates that an error has occurred.
*Return codes can be added or changed from one release to the next. Use scripts that depend on a specific return code with caution.
*This example shows how you might use the HOLDER qualifier on UNIX in a script that performs a database backup:
proutil mydb -C holder
retcode=$? # this saves the return code
case $retcode in
0) echo "The database is not busy, ok to backup"
   ;;
14) echo "The database is locked, no backup done"
   exit $retcode
   ;;
16) echo "The database is busy in multi-user mode, no backup done"
   exit $retcode
   ;;
*) proutil failed, no backup done
   echo error code = $retcode
   exit $retcode
   ;;
esac
proutil mydb -C truncate bi
<<test the return value from proutil here>>
<<put the backup command here>>
rfutil mydb -C mark backedup