Stopping Db2 when no activity is outstanding

Before stopping Db2, make sure the subsystem does not have any outstanding activity, such as outstanding units of recovery or pending writes. Ensuring that at restart, Db2 does not need to access the data sets through the log, which contains the old data set qualifiers.

Procedure

Begin general-use programming interface information.Begin general-use programming interface information.To stop Db2 when no activity is outstanding:

  1. Stop Db2 by entering the following command:
    -STOP DB2 MODE(QUIESCE)

    This command allows Db2 to complete processing currently executing programs.

  2. Start Db2 by entering the following command:
    -START DB2 ACCESS(MAINT)
  3. Use the following commands to make sure the subsystem is in a consistent state.
    • -DISPLAY THREAD(*) TYPE(*)
    • -DISPLAY UTILITY (*)
    • -TERM UTILITY(*)
    • -DISPLAY DATABASE(*) RESTRICT
    • -DISPLAY DATABASE(*) SPACENAM(*) RESTRICT
    • -RECOVER INDOUBT

    Correct any problems before continuing.

  4. Stop Db2 by entering the following command:
    -STOP DB2 MODE(QUIESCE)

    End general-use programming interface information.

  5. Run the print log map utility (DSNJU004) to identify the current active log data set and the last checkpoint RBA.
  6. Run DSN1LOGP with the SUMMARY (YES) option, using the last checkpoint RBA from the output of the print log map utility you ran in the previous step.

    The report headed DSN1157I RESTART SUMMARY identifies active units of recovery or pending writes. If either situation exists, do not attempt to continue. Start Db2 with ACCESS(MAINT), use the necessary commands to correct the problem, and repeat steps 4 through 6 until all activity is complete.