Migration step 8: Stop Db2 12 activity

Before making Db2 13 operational, ensure that all work is stopped on the Db2 12 subsystem.

Before you begin

If you do not stop work on the Db2 12 subsystem or data sharing member that you are migrating, fallback procedures might fail.

Procedure

To stop work on the system that you are migrating:

  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 12 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.
    • All utilities must be restarted or terminated on the version on which they were started. If you do not use data sharing, ensure that all utilities are completed or terminated on Db2 12. 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.