-STOP DDF command (Db2)

The -STOP DDF command stops the distributed data facility (DDF) if it has already been started; use this command to terminate the DDF interface to VTAM® or TCP/IP.

Abbreviation: -STO DDF

Environment

This command can be issued from a z/OS® console, a DSN session under TSO, a DB2I panel (DB2 COMMANDS), an IMS or CICS® terminal, or a program using the instrumentation facility interface (IFI).

Data sharing scope: Member

Authorization

To execute this command, you must use a privilege set of the process that includes one of the following authorities:
  • SYSOPR authority
  • SYSCTRL authority
  • SYSADM authority

Db2 commands that are issued from a logged-on z/OS console or TSO SDSF can be checked by Db2 authorization using primary and secondary authorization IDs. Start of changeA logged-on z/OS user ID must be defined in RACF or a similar security server.End of change

Syntax

Read syntax diagramSkip visual syntax diagramSTOP DDFMODE(QUIESCE)MODE(FORCE)MODE(SUSPEND)CANCEL( n)WAIT( n)

Option descriptions

MODE
Indicates whether currently executing active distributed threads are allowed to complete.
(QUIESCE)
Allows active distributed threads that are using DDF to complete normally and terminates only inactive distributed threads. If DDF THREADS ACTIVE (the CMTSTAT subsystem parameter) was specified during Db2 installation , all DDF threads are active threads.
Deprecated function: The CMTSTAT subsystem parameter is deprecated, which means that it might be removed eventually. Set the CMTSTAT value to INACTIVE. Although, the ACTIVE setting can sometimes provide limited CPU performance advantages, they are generally outweighed by increased use of other system resources and the lack of scalability for distributed application workloads. For the recommended alternatives to the ACTIVE setting, see Enabling KEEPDYNAMIC refresh for DBATs and Enabling high-performance DBATs.
(FORCE)
Terminates all currently executing distributed threads.

Some tasks, such as stored procedures tasks and Db2 service tasks, terminate abnormally. When they terminate abnormally, you might see dumps and messages resulting from these failures.

(SUSPEND)
Suspends all DDF threads by:
  • Keeping inactive DDF threads inactive until a subsequent START DDF command is issued
  • Terminating all DDF pool threads
  • Preventing inbound DDF work from starting

MODE(SUSPEND) is intended to be used at a Db2 DRDA server when locking conflicts exist between CREATE, ALTER, DROP, GRANT, or REVOKE operations and client access to data. Requests that normally cause work to be dispatched (including requests for new connections) are queued. Outbound DDF processing is not affected by this command.

CANCEL ( n )
Cancels all active DDF database access threads if suspend processing does not complete in n seconds. The range of n is 0 to 9999.
WAIT ( n )
Resumes DDF processing if suspend processing does not complete in n seconds. The range of n is 0 to 9999.

Usage notes

MODE(QUIESCE): If MODE(QUIESCE) is used, all distributed activity must complete before DDF stops. The operator can tell whether any distributed threads remain by using DISPLAY THREAD with the LOCATION option. To cancel distributed threads that are preventing DDF from stopping, use CANCEL THREAD or STOP DDF MODE(FORCE).

MODE(QUIESCE) forces any inactive threads to terminate. A requesting system that is using two-phase commit on an inactive thread might report the terminated thread as indoubt at the system that issued STOP DDF. The thread is not actually indoubt (no commit or rollback is pending), and the condition is resolved when DDF is restarted.

MODE(FORCE): If MODE(FORCE) is used, the Db2 connection to VTAM or TCP/IP terminates. The termination forces all VTAM or TCP/IP requests to complete immediately, indicating that a communications error has occurred and DDF has stopped. A forced stop might take as long as three minutes to complete.

If any applications are updating remote servers that use two-phase commit, MODE(FORCE) might result in indoubt threads at each server.

MODE(SUSPEND): If MODE(SUSPEND) completes successfully, additional database resources, which are not inbound DDF work, might still be held. Cancel these additional resources with CANCEL THREAD.

The following table summarizes the actions that Db2 takes when START DDF, STOP DDF, START DB2, and STOP DB2 commands are issued with different DDF states.
Table 1. The result of commands on the DDF status
DDF status START DDF command STOP DB2 or STOP DDF command without MODE(FORCE) STOP DB2 or STOP DDF command with MODE(FORCE) STOP DDF command with MODE(SUSPEND)
Starting DSNL003I DSNL003I DSNL003I DSNL003I
Started DSNL001I DDF stops DDF forced stop DDF suspends
Stopping DSNL005I DSNL005I DSNL005I DSNL005I
Stopped DDF starts DSNL002I DSNL002I DSNL002I
Suspending DDF resumes DDF stops DDF forced stop DSNL069I
Suspended DDF resumes DDF stops DDF forced stop DSNL065I

Examples

Example 1
Stop the distributed data facility (MODE QUIESCE).
-STOP DDF
Example 2
Stop the distributed data facility (MODE FORCE).
-STOP DDF MODE(FORCE)
Example 3
Suspend distributed data facility activity (MODE SUSPEND). If command processing continues after 600 seconds, cancel any remaining DDF threads.
-STOP DDF MODE(SUSPEND) CANCEL(600)