Forces all users off either the specified instance or database across all members and puts them into a quiesced mode.
While the instance or database is in quiesced mode, you can perform administrative tasks on it. After administrative tasks are complete, use the UNQUIESCE command to activate the instance or database and allow other users to connect to the database.
In this mode, only users with authority in this restricted mode are allowed to attach or connect to the instance or database. Users with SYSADM, SYSMAINT, and SYSCTRL authority always have access to an instance while it is quiesced, and users with SYSADM and DBADM authority always have access to a database while it is quiesced.
QUIESCE DATABASE results in all objects in the database being in the quiesced mode. Only the allowed user or group and SYSADM, SYSMAINT, DBADM, or SYSCTRL will be able to access the database or its objects.
QUIESCE INSTANCE instance-name means the instance and the databases in the instance instance-name will be in quiesced mode. The instance will be accessible just for SYSADM, SYSMAINT, and SYSCTRL and allowed user or group.
If an instance is in quiesced mode, a database in the instance cannot be put in quiesced mode.
If a database is in the SUSPEND_WRITE state, it cannot be put in quiesced mode.
One of the following authorities:
Database
(Database connection is not required for an instance quiesce.)
>>-QUIESCE--+-DATABASE-+----------------------------------------> '-DB-------' >--+-IMMEDIATE------------------------+-------------------------> '-DEFER--+-----------------------+-' '-WITH TIMEOUT--minutes-' .-FORCE CONNECTIONS-. >--+-------------------+---------------------------------------><
>>-QUIESCE INSTANCE--instance-name--+-------------------+-------> +-USER--user-name---+ '-GROUP--group-name-' >--+-------------------+----------------------------------------> '-RESTRICTED ACCESS-' >--+-IMMEDIATE------------------------+-------------------------> '-DEFER--+-----------------------+-' '-WITH TIMEOUT--minutes-' .-FORCE CONNECTIONS-. >--+-------------------+---------------------------------------><
The databases within the quiesced instance will be activated to do authorization checking for all connect attempts to the database. This is necessary to determine if the connecting user ID has DBADM authority; this authority is stored in the database catalog and the database must be activated to determine if the user ID has it. To prevent this authorization checking from happening, specify the RESTRICTED ACCESS option.
In the following example, the default behavior is to force connections, so it does not need to be explicitly stated and can be removed from this example.
db2 quiesce instance crankarm user frank immediate force connections
The following example forces off all users with connections to the database.
db2 quiesce db immediate
The second example will quiesce the database you are attached to, preventing access by all users except those with one of the following authorities: SYSADM, SYSMAINT, SYSCTRL, or DBADM.
For example,
grant quiesce_connect on database to username/groupname
revoke quiesce_connect on database from username/groupname