IBM Books

Command Reference

STOP DATABASE MANAGER

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

PROFILE profile
MPP only. Specifies the name of the profile file that was executed at startup to define the DB2 environment for those nodes that were started. If a profile for START DATABASE MANAGER was specified, the same profile must be specified here. The profile file must reside in the sqllib directory of the instance owner.

NODENUM nodenum
MPP only. Specifies the node to be stopped.

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.

DROP NODENUM nodenum
MPP only. Specifies the node to be dropped from the db2nodes.cfg file.

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.

FORCE
Specifies to use FORCE APPLICATION ALL when stopping the database manager at each node.

NODENUM nodenum
MPP only. Specifies the node (database partition server) to be stopped after all applications on that node have been forced to stop. If the FORCE option is used without this parameter, all applications on all nodes are forced before all the nodes 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.

Usage Notes

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

DEACTIVATE DATABASE

DROP NODE VERIFY

FORCE APPLICATION

START DATABASE MANAGER.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]