Release 10.1A: OpenEdge Data Management:
Database Administration

> ## 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 | Database not in use.
> 14 | Database locked by single user, PROUTIL, or RFUTIL.
> 16 | Database 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

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095