Command Reference

FORCE APPLICATION

Forces local or remote users or applications off the system to allow for maintenance on a server.

Attention: If an operation that cannot be interrupted (RESTORE DATABASE, for example) is forced, the operation must be successfully re-executed before the database becomes available.

Scope

This command affects all nodes that are listed in the $HOME/sqllib/db2nodes.cfg file.

In a partitioned database environment, this command does not have to be issued from the coordinator node of the application being forced. It can be issued from any node (database partition server) in the partitioned database environment.

Authorization

One of the following:

Required Connection

Instance. To force users off a remote server, it is first necessary to attach to that server. If no attachment exists, this command is executed locally.

Command Syntax

>>-FORCE APPLICATION----+-ALL-------------------------------+--->
                        |    .-,---------------------.      |
                        |    V                       |      |
                        '-(-----application-handle---+---)--'
 
>----+------------+--------------------------------------------><
     '-MODE ASYNC-'
 

Command Parameters

APPLICATION

ALL
All applications will be disconnected from the database.

application-handle
Specifies the agent to be terminated. List the values using LIST APPLICATIONS.

MODE ASYNC
The command does not wait for all specified users to be terminated before returning; it returns as soon as the function has been successfully issued or an error (such as invalid syntax) is discovered.

This is the only mode that is currently supported.

Examples

The following example forces two users, with application-handle values of 41408 and 55458, to disconnect from the database:

   db2 force application ( 41408, 55458 )

Usage Notes

db2stop cannot be executed during a force. The database manager remains active so that subsequent database manager operations can be handled without the need for db2start.

To preserve database integrity, only users who are idling or executing interruptible database operations can be terminated.

Users creating a database cannot be forced.

After a FORCE has been issued, the database will still accept requests to connect. Additional forces may be required to completely force all users off.

See Also

ATTACH

LIST APPLICATIONS.


[ Top of Page | Previous Page | Next Page ]