DB2 Version 10.1 for Linux, UNIX, and Windows

QUIESCE command

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.

Scope

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.

Authorization

One of the following authorities:

For database level quiesce:
  • SYSADM
  • DBADM
For instance level quiesce:
  • SYSADM
  • SYSCTRL

Required connection

Database

(Database connection is not required for an instance quiesce.)

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-QUIESCE--+-DATABASE-+---------------------------------------->
            '-DB-------'   

>--+-IMMEDIATE------------------------+------------------------->
   '-DEFER--+-----------------------+-'   
            '-WITH TIMEOUT--minutes-'     

   .-FORCE CONNECTIONS-.   
>--+-------------------+---------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>-QUIESCE INSTANCE--instance-name--+-------------------+------->
                                    +-USER--user-name---+   
                                    '-GROUP--group-name-'   

>--+-------------------+---------------------------------------->
   '-RESTRICTED ACCESS-'   

>--+-IMMEDIATE------------------------+------------------------->
   '-DEFER--+-----------------------+-'   
            '-WITH TIMEOUT--minutes-'     

   .-FORCE CONNECTIONS-.   
>--+-------------------+---------------------------------------><

Command parameters

DEFER
Wait for applications until they commit the current unit of work.
WITH TIMEOUT minutes
Specifies a time, in minutes, to wait for applications to commit the current unit of work. If no value is specified, in a single-partition database environment, the default value is 10 minutes. In a partitioned database environment the value specified by the start_stop_time database manager configuration parameter will be used.
IMMEDIATE
Do not wait for the transactions to be committed, immediately roll back the transactions.
FORCE CONNECTIONS
Force the connections off.
DATABASE
Quiesce the database. All objects in the database will be placed in quiesced mode. Only specified users in specified groups and users with SYSADM, SYSMAINT, and SYSCTRL authority will be able to access to the database or its objects.
INSTANCE instance-name
The instance instance-name and the databases in the instance will be placed in quiesced mode. The instance will be accessible only to users with SYSADM, SYSMAINT, and SYSCTRL authority and specified users in specified groups.

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.

USER user-name
Specifies the name of a user who will be allowed access to the instance while it is quiesced.
GROUP group-name
Specifies the name of a group that will be allowed access to the instance while the instance is quiesced.
RESTRICTED ACCESS
Specify this option to prevent authorization checking for all connect attempts to the databases of a quiesced instance to determine if the user ID has DBADM authority. Instance-level authorization checking can still occur; checking a user ID for SYSADM, SYSCTRL, or SYSMAINT authority does not require a database to be activated.
Note: This command option is available in DB2® Version 9.7 Fix Pack 2 and later fix packs.

Examples

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

Usage notes