DB2 Server for VSE: System Administration


Resynchronization

Resynchronization occurs if two-phase commit processing is interrupted by a resource failure. A resource failure may be caused by a node failure, a session failure, a program failure or other problems by a protected resource manager. The resource failure may be between a sync point manager and local resource managers or sync point manager and remote resource managers.

Resynchronization is conducted independently for each failed protected resource for which it is required. Resynchronization has the following purposes:

Resync When Partner is Not Active

After an LU failure, it is possible that the partner that is responsible for resync is unable to establish the resync conversation because the failed LU has not been restarted. The responsible LU retries the resync at implementation-defined intervals.

In order to reduce the delay for resynchronization after an LU is restarted, the partner LU may signal to the resync initiator that it is available by sending an Exchange Log Names GDS variable that is not accompanied by a Compare States GDS variable. 2 Once the responsible LU has received this signal that the failed LU is active, it can initiate resync, sending the Exchange Log Names and Compare States GDS variables.

Sending the Exchange Log Names GDS variable as a signal of LU availability need be done only once, no matter how many protected conversations require resynchronization between the two LUs. Also, if the LU that becomes available is responsible for initiating resync for some conversations, it need not send another Exchange Log Names GDS variable as a signal that the LU is available, since the partner SPM can infer that a partner is available from the other resyncs the partner SPM initiates.

Resolution of In-doubts

In the VSE environment, resynchronization has two components:

The details of what the task-related user exit does when it receives the operation code from the CICS/VSE Syncpoint Manager during task-related user exit resynchronization are shown in Table 33.

Table 33. Actions by the DRDA task-related user exit during task-related user exit resynchronization
CICS/VSE Syncpoint Manager operation code received by TRUE DRDA task-related user exit actions
Backout (UERTBACK) Issues EXEC SQL ROLLBACK to resource manager
Committed (UERTCOMM) Issues EXEC SQL COMMIT to resource manager
Lost due to CICS cold start (UERTDGCS) Generates a message indicating that the LUW is lost due to CICS cold start:
ARI0193E The CICS log does not contain information for an in-doubt
         logical unit of work belonging to server server_name.

Instructs the operator to FORCE the LUW if the LUW has an agent assigned to it (for example, the LUW has not been FORCED):

ARI4018A Use the database manager SHOW and FORCE commands
         to commit or rollback the following units of work:
ARI4019I SERVER_NAME = server_name.
         USER ID = user id.
         AGENT IDENTIFIER = N.

Instructs the operator to RESET INDOUBT if the LUW does not have an agent assigned to it (for example, the LUW has been FORCED):

ARI0195A Use the database manager SHOW INDOUBT operator
         command to find the following units of work:
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.
LUW should not be in doubt (UERTDGNK) Generates a message indicating that the LUW should not be in doubt:

ARI0194E A logical unit of work that the database manager
         for server server_name indicated needed to be
         resolved was not identifed by the CICS/VSE log as needing
         resolution.

Instructs the operator to FORCE the LUW if the LUW has an agent assigned to it (for example, the LUW has not been FORCED):

ARI4018A Use the database manager SHOW and FORCE commands
         to commit or rollback the following units of work:
ARI4019I SERVER_NAME = server_name.
         USER ID = user id.
         AGENT IDENTIFIER = N.

Instructs the operator to RESET INDOUBT if the LUW does not have an agent assigned to it (for example, the LUW has been FORCED):

ARI0195A Use the database manager SHOW INDOUBT operator
         command to find the following units of work:
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.
Note:
  1. When the SHOW and FORCE operator commands are used to commit or rollback an LUW, the RESET INDOUBT operator command must be issued to cause DB2 Server for VSE to forget about the LUW.
  2. When message ARI0195A is issued, the RESET INDOUBT operator command must be issued to cause DB2 Server for VSE to forget about the LUW.
  3. In both cases, before RESET INDOUBT is issued, any user-defined action to resynchronize the local and remote databases must be done.
  4. VSE messages come up in the CICS partition, not in the partition you are working on.

The DB2 Server for VSE resource manager processes the SQL request it received from the task-related user exit. The action it takes is determined by the SQL request and the LUW state which it remembers. These actions are shown in Table 34.

Table 34. Actions by the DB2 Server for VSE resource manager during task-related user exit resynchronization
LUW state at DB2 Server for VSE SQL request passed by task-related user exit
Rollback Commit
LUWID Not Found Send normal completion reply indicating Backout state. DB2 Server for VSE notifies operator with message:
ARI0183E The Sync Point Manager has asked to ROLLBACK
         this LUW but the database manager has no
         memory of it.
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.
Send normal completion reply indicating Committed state. DB2 Server for VSE notifies operator with message:
ARI0183E The Sync Point Manager has asked to COMMIT
         this LUW but the database manager has no
         memory of it.
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.
Indoubt (Prepared) Drive backout of resource and send normal completion reply indicating Backout state. Drive commit of resource and send normal completion reply indicating Committed state.
Heuristic Backout Send normal completion reply indicating Backout state. Send normal completion reply indicating Committed state. DB2 Server for VSE notifies operator with message:
ARI0184A The Sync Point Manager has asked to COMMIT
         this LUW but the FORCE command was
         previously used to ROLLBACK it.
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.

In this case, the LUW will still appear when the SHOW INDOUBT command is executed. The LUW must be cleared using the RESET INDOUBT command. In addition, manual intervention is necessary to ensure that the LUW is in a consistent state at all sites where the LUW has been distributed. This may require intervention at this database manager, or possibly at another database manager. Manual intervention could mean manually fixing the data or possibly restoring an archive.

Heuristic Committed Send normal completion reply indicating Backout state. DB2 Server for VSE notifies operator with message:
ARI0184A The Sync Point Manager has asked to ROLLBACK
         this LUW but the FORCE command was
         previously used to COMMIT it.
ARI0196I SERVER_NAME = server_name.
         RECOVERY TOKEN = rectok.

In this case, the LUW will still appear when the SHOW INDOUBT command is executed. The LUW must be cleared using the RESET INDOUBT command. In addition, manual intervention is necessary to ensure that the LUW is in a consistent state at all sites where the LUW has been distributed. This may require intervention at this database manager, or possibly at another database manager. Manual intervention could mean manually fixing the data or possibly restoring an archive.

Send normal completion reply indicating Committed state.
Note:
  1. The state Syncpoint Pending is not possible at DB2 Server for VSE servers. The server completes any sync point actions such as prepare to commit, commit, or rollback before the CICS/VSE Syncpoint Manager performs any sync point logging.
  2. The state Backout (Reset) is not possible at DB2 Server for VSE servers. The servers complete rollback processing before the CICS/VSE Syncpoint Manager performs any sync point logging for backout.
  3. The state committed is not possible at DB2 Server for VSE servers. The servers complete commit processing before the CICS/VSE Syncpoint Manager performs any sync point logging for committed.
  4. It is very remote that "LUWID Not Found" would occur. It can only happen if the following occurs:
    1. TRUE enablement support obtains from the DB2 Server for VSE resource manager a list of LUWIDs that require resynchronization.
    2. The FORCE and RESET INDOUBT operator commands are issued for an LUWID that was in the list of LUWIDs above.
    3. TRUE enablement support commits or backs out LUWID according to the disposition of the CICS URD.
  5. The task-related user exit resynchronization process is all one way, from CICS to the external resource manager (such as, DB2 for VSE). After the task-related user exit has obtained a list of in-doubt LUWs from the DB2 for VSE resource manager and has passed this list to CICS via the RESYNC command, CICS looks at its URDs to determine whether to commit or backout each LUW. There is no provision for a DB2 for VSE resource manager, through its task-related user exit, to inform CICS that a heuristic decision was made for an LUW.

    The only sensible thing for the DB2 Server for VSE resource manager to do, in the case of a heuristic damage, is to send a normal completion reply, as opposed to sending an abnormal reply. This way, the task-related user exit can vote UERFDONE (Forget) to the CICS/VSE Syncpoint Manager and the CICS/VSE Syncpoint Manager can throw away the unit of recovery descriptor (URD) associated with this LUW. If the DB2 Server for VSE resource manager sends an abnormal reply, the task-related user exit will vote UERFHOLD and CICS will hold the URD for this LUW until the next RESYNC. If the resource manager had "forgotten" the LUW, (for example, RESET INDOUBT was done), CICS will assume that the resource manager is not interested in this LUW and will throw away the corresponding URD. Therefore, both normal and abnormal replies eventually produce the same results, but it is more efficient to send a normal reply in the case where a heuristic damage has occurred.


Footnotes:

2
The partner can tell that a Compare States GDS variable is not present because SPM's RECEIVE_AND_WAIT verb will complete with a WHAT_RECEIVED of SEND rather than DATA_COMPLETE.

3
For general information on how CICS handles this, see the section "Syncpoint and Recovery" in the "VTAM LU6.2" chapter of the CICS/VSE Diagnosis Reference manual

4
For more information on the INDOUBT option, see the section "The INDOUBT Option of the Transaction Definition" in the "Recovery and Restart in Interconnected Systems" chapter of the CICS/VSE Intercommunication Guide.

5
For general information on how CICS handles user exit resynchronization, see the chapter "Task-related User Exit Recovery" in the CICS/VSE Diagnosis Reference manual


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]