Scenario: Recovering from an IMS outage that results in an IMS cold start

An IMS outage can result in an IMS cold start. An organization that experiences this situation can recover.

Symptoms

When IMS is cold started and later reconnects with the SEA Db2 subsystem, IMS is not able to resolve the indoubt thread with Db2. Message DSNM004I is displayed at the IMS master terminal.

Environment

The following figure illustrates the environment for this scenario.

Figure 1. Resolution of indoubt threads. Scenarios for resolving problems with indoubt threads contains a detailed description of the scenario depicted in this figure.
Begin figure description. This figure is a flowchart that depicts threads between four systems that are located at three different locations. End figure description.

The abnormal termination of IMS has left one allied thread A at the SEA Db2 subsystem indoubt. This is the thread whose LUWID=15. Because the SEA Db2 subsystem still has effective communication with the Db2 subsystem at SJ, the LUWID=15 DBAT 1 at this subsystem is waiting for the SEA Db2 to communicate the final decision and is not aware that IMS has failed. Also, the LUWID=15 DBAT at LA 2, which is connected to SJ, is also waiting for SJ to communicate the final decision. This cannot be done until SEA communicates the decision to SJ.

  • The connection remains active.
  • IMS applications can still access Db2 databases.
  • Some Db2 resources remain locked out.

If the indoubt thread is not resolved, the IMS message queues can start to back up. If the IMS queues fill to capacity, IMS terminates. Therefore, users must be aware of this potential difficulty and must monitor IMS until the indoubt units of work are fully resolved.

Resolving the problem

System programmer response: Issue the RECOVER INDOUBT command to resolve the indoubt thread at the SEA Db2 subsystem. This completes the two-phase commit process with the Db2 subsystems at SJ and LA, and the unit of work either commits or aborts.
  1. Force the IMS log closed by using the /DBR FEOV command, and then archive the IMS log. Use the command DFSERA10 to print the records from the previous IMS log tape for the last transaction that was processed in each dependent region. Record the PSB and the commit status from the X'37' log that contains the recovery ID.
  2. Run the DL/I batch job to back out each PSB that is involved and that has not reached a commit point. The process might take some time because transactions are still being processed. The process might also lock up a number of records, which could affect the rest of the processing and the rest of the message queues.
  3. Enter the Db2 command DISPLAY THREAD (imsid) TYPE (INDOUBT).
  4. Compare the NIDs (IMSID + OASN in hexadecimal) that is displayed in the DISPLAY THREAD messages with the OASNs (4 bytes decimal) as shown in the DFSERA10 output. Decide whether to commit or roll back.
  5. Use DFSERA10 to print the X'5501FE' records from the current IMS log tape. Every unit of recovery that undergoes indoubt resolution processing is recorded; each record with an 'IDBT' code is still indoubt. Note the correlation ID and the recovery ID, for use during the next step.
  6. Enter the following Db2 command, choosing to commit or roll back, and specify the correlation ID:
    -RECOVER INDOUBT (imsid) ACTION(COMMIT|ABORT) NID (nid)

    If the command is rejected because network IDs are associated, use the same command again, substituting the recovery ID for the network ID.