STOP DATABASE MANAGER command
The STOP DATABASE MANAGER command stops the database manager on the target member or all members. In a Db2® pureScale® environment, it is also used to stop the cluster caching facility (CF).
Scope
In a Db2 pureScale environment or, a partitioned database environment, this command affects all members that are listed in the db2nodes.cfg file, unless either a DBPARTITIONNUM, MEMBER, or CF parameter is specified.
The command does not shut down the member if there are active database connections. If there are no active database connections, but there are instance attachments, then the instance attachments are forced off first and then the member is stopped. This command also deactivates any outstanding database activations before stopping the member. This command can also be used to stop instance services on a given host.
This command is not valid on a client.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
Required connection
None
Command syntax
Command parameters
- INSTANCE ON hostname
- Specifies to stop the Db2 instance on a particular host of the Db2 pureScale instance for maintenance operations. This command temporarily prevents the host from being restarted with the global db2start command. The host can no longer act as guest host for a restart light situation.
- identifier
- Specifies the numeric identifier without having to specify the DBPARTITIONNUM, MEMBER, or CF parameters.
- DBPARTITIONNUM identifier
- This parameter option is valid only in a partitioned database environment. Specifies the member
to be stopped. Valid values are from 0 to 999 inclusive.Note: If the FORCE option is used without this parameter, all applications on all database partitions are forced before all the database partitions are stopped.Note: The identifier value must exist in the db2nodes.cfg file of the instance owner. If no database partition number is specified, all database partitions defined in the configuration file are stopped.
- MEMBER identifier
- Specifies the member to be stopped. In a Db2 pureScale environment, valid values are from 0 to 127 inclusive.
- CF identifier
- This parameter option is valid only in a Db2 pureScale environment. Specifies the cluster caching facility (CF) to be stopped. Valid values are 128 and 129. If used outside of a Db2 pureScale, an SQL1695N error is returned.
- PROFILE profile
- This parameter option is valid only in a partitioned database environment. Specifies the name of the profile file that was executed at startup to define the Db2 environment for those database partitions that were started. If a profile for the START DATABASE MANAGER command was specified, the same profile must be specified here. The profile file must reside in the sqllib directory of the instance owner.
- DROP DBPARTITIONNUM identifier
- This parameter option is valid only in a partitioned database environment. Specifies the
database partition to be dropped from the db2nodes.cfg configuration
file.Note: Before using the DROP DBPARTITIONNUM parameter, run the DROP DBPARTITIONNUM VERIFY command to ensure that there is no user data on this database partition environment.
- FORCE
- Specifies to use FORCE APPLICATION ALL when stopping the database manager at each database partition.
- QUIESCE minutes
- This parameter option is valid only in a Db2
pureScale environment
and valid only for the MEMBER parameter clause. It is used to stop active
workload on a given member before the member is shut down (it cannot be used against a cluster caching facility). As opposed to a
db2stop
FORCE command where active applications are interrupted immediately, quiesce
affords them a graceful exit by waiting until all applications on the member have completed their
active transactions. The optional minutes parameter value specifies how long the
command waits before it tells applications to disconnect from the given member. Once this timeout is
reached, any active units of work remaining at the time are interrupted. If no timeout is specified
the command waits indefinitely until all active applications have ended their unit of work before
proceeding with shutting down the member.Important: To bring the member back online, you need to issue the db2start command against the member.
Valid values for the minutes parameter value are from -1 to 1440 inclusive. The default value is -1 which means the specified member waits indefinitely until all active workload has ended. If a value of 0 is specified then active applications are interrupted immediately and, once they end, the member is shut down.
Note: A db2stop QUIESCE command is not interruptible. After you issue the command, no further Db2 commands may be run directly against that member. If you want to query information about the quiesced member, you need to issue the LIST APPLICATIONS GLOBAL SHOW DETAIL command from another active member. If you want to stop an application that is running on a quiesced member, you need to issue the FORCE APPLICATION '(<app handle>)' command from another active member.
Examples
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
On UNIX operating systems, the start_stop_time configuration parameter on
multi-member Db2 instances only includes the time required to stop any particular member locally; it
does not include the time required to send the stop request to remote members through
rsh
or ssh
.
On Microsoft Windows, you must execute this command from a Db2 command window running with full administrator privileges.
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 the FORCE APPLICATION command to disconnect all users first, or reissue the STOP DATABASE MANAGER command with the FORCE option.
- If no parameters are specified, the database manager is stopped on each database partition listed in the configuration file. The administration notification log might contain messages to indicate that other database partitions are shutting down.
- Any database partitions added to the partitioned database environment since the previous STOP DATABASE MANAGER command was issued are updated in the db2nodes.cfg file.
- On UNIX operating systems, if the value specified for the start_stop_time database manager configuration parameter is reached, all in-progress stops are interrupted, and message SQL6037N is returned from each interrupted database partition to the $HOME/sqllib/log/db2stop.timestamp.log error log file. Database partitions that are already stopped are not affected.
- The db2cshrc file is not supported and cannot be specified as the value for the PROFILE parameter.