Stopping Db2 activity

Before running any installation jobs to migrate a data sharing member, ensure that all work is stopped on the subsystem.

Procedure

To stop work on Db2:

  1. Issue the following command, where -DSN1 is the subsystem command prefix that is defined for Db2.
    You must have system administrator (SYSADM) or system operator (SYSOPR) authority to issue this command.
    Begin general-use programming interface information.
    -DSN1 STOP DB2 MODE(QUIESCE)
    End general-use programming interface information.
    The QUIESCE keyword allows Db2 to complete the processing of programs that are currently executing. This might require some processing time.
  2. Issue the following command to allow only the system administrators and system operators that were defined during installation to access Db2:
    Begin general-use programming interface information.
    -DSN1 START DB2 ACCESS(MAINT)
    End general-use programming interface information.
    If Db2 does not start properly, it usually abends with a reason code that indicates where the error occurred. To find the error, check the set of definitions for the associated resource. For example, if the bootstrap data set (BSDS) does not match the subsystem parameter values, ensure that the correct jobs were run for DSNTIJUZ. Ensure that you started Db2 with the correct subsystem parameter option.
  3. Follow these steps to ensure that all Db2 11 work is stopped:
    • Make sure no units of recovery remain. Issue the following command:
      Begin general-use programming interface information.
      -DSN1 DISPLAY THREAD(*) TYPE(*)
      End general-use programming interface information.
      Then use -DSN1 RECOVER INDOUBT for any indoubt threads.
    • Ensure that all utilities are completed or terminated. To ensure that no utility work remains, issue the following command:
      Begin general-use programming interface information.
      -DSN1 DISPLAY UTILITY(*) 
      End general-use programming interface information.

      After you have determined the utilities that are running, you can let them complete processing or you can terminate the utility. To stop all utilities, issue the following command:

      -DSN1 TERM UTILITY(*) 
    • Ensure that no table spaces and index spaces in the Db2 directory (DSNDB01) or the Db2 catalog (DSNDB06) have write error ranges or deferred restart states. To determine existing restrictions, issue the following commands:
      Begin general-use programming interface information.
      -DSN1 DISPLAY DATABASE(DSNDB01) SPACENAM(*) RESTRICT 
      -DSN1 DISPLAY DATABASE(DSNDB06) SPACENAM(*) RESTRICT 
      End general-use programming interface information.

      You must have system administrator or system operator authority (specified on installation panel DSNTIPP1) to issue this command.

      Recover any table spaces and index spaces that have write error ranges or deferred restart states by using the RECOVER utility.

  4. Stop Db2by issuing the following command:
    Begin general-use programming interface information.
    -DSN1 STOP DB2 MODE(QUIESCE)
    End general-use programming interface information.

    A user with installation system administrator (installation SYSADM) or installation system operator (installation SYSOPR) authority must enter this command.