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
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