FORCE APPLICATION command
The FORCE APPLICATION command forces local or remote users or applications off the system to allow for maintenance on a server.
Scope
This command affects all database partitions 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 database partition of the application being forced. It can be issued from any database partition server in the partitioned database environment.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
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
Command parameters
- FORCE APPLICATION
-
- ALL
- All applications will be disconnected from the database server.
- application-handle
- Specifies the agent to be terminated. List the values using the LIST APPLICATIONS command.
- 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
db2 "force application ( 41408, 55458 )"
Usage notes
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
- system applications
After a FORCE APPLICATION has been issued, the database will still accept requests to connect. Additional forces might be required to completely force all users off.