Stops the current database manager instance. Unless explicitly stopped, the database manager continues to be active. This command does not stop the database manager instance if any applications are connected to databases. If there are no database connections, but there are instance attachments, it forces the instance attachments and stops the database manager. This command also deactivates any outstanding database activations before stopping the database manager.
On an MPP system, this command stops the current database manager instance on a node or on all nodes. When it stops the database manager on all nodes, it uses the node configuration file db2nodes.cfg to obtain information about each node.
This command can also be used to drop a node from the db2nodes.cfg file (MPP systems only).
This command is not valid on a client.
Scope
By default, and in a multi-node environment, this command affects all nodes that are listed in the db2nodes.cfg file.
Authorization
One of the following:
Note: | On OS/2, no authorization is required if the ss_logon database manager configuration parameter is set to NO. |
Required Connection
None
Command Syntax
>>-+-STOP--+-DATABASE MANAGER-+-+---+-------------------+-------> | +-DB MANAGER-------+ | '-PROFILE--profile--' | '-DBM--------------' | '-db2stop--------------------' >-----+------------------------------+------------------------->< +-NODENUM--nodenum-------------+ +-DROP NODENUM--nodenum--------+ '-FORCE--+-------------------+-' '-NODENUM--nodenum--'
Command Parameters
Valid values are from 0 to 999 inclusive, and must be in the db2nodes.cfg file. If no node number is specified, all nodes defined in the node configuration file are stopped.
Before using this parameter, run DROP NODE VERIFY to ensure that there is no user data on this node.
When this option is specified, all nodes in the db2nodes.cfg file are stopped.
Examples
The following is sample output from db2stop issued on a three node system with nodes 10, 20, and 30:
04-07-1997 10:32:53 10 0 SQL1064N DB2STOP processing was successful. 04-07-1997 10:32:54 20 0 SQL1064N DB2STOP processing was successful. 04-07-1997 10:32:55 30 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. |
It is not necessary to issue this command on a client node. It is provided for compatibility with older clients, but it has no effect on the database manager.
Once started, the database manager instance runs until the user stops it, even if all application programs that were using it have ended.
If the database manager is stopped, a successful completion message is sent to the standard output device. If an error occurs, processing stops, and an error message is sent to the standard output device.
If the database manager cannot be stopped because application programs are still connected to databases, use FORCE APPLICATION to disconnect all users first, or reissue the STOP DATABASE MANAGER command with the FORCE option.
The following information currently applies to multi-node environments only:
Attention: The UNIX kill command should not be used to terminate the database manager because it will abruptly end database manager processes without controlled termination and cleanup processing.
See Also