Resolution of RRS indoubt units of recovery
Sometimes a Db2 unit of recovery (for a thread that uses RRSAF) or an RRS unit of recovery (for a stored procedure) enters the indoubt state.
This is a state where a failure occurs when the participant (Db2 for a thread that uses RRSAF or RRS for a stored procedure) has completed phase 1 of commit processing and is waiting for the decision from the commit coordinator. This failure could be a Db2 abnormal termination, an RRS abnormal termination, or both.
Normally, automatic resolution of indoubt units of recovery occurs when Db2 and RRS re-establish communication with each other. If something prevents this, you can manually resolve an indoubt unit of recovery. This process is not recommended because it might lead to inconsistencies in recoverable resources.
The following errors make manual recovery necessary:
- An RRS cold start where the RRS log is lost.
If Db2 is a participant and has one or more indoubt threads, these indoubt threads must be manually resolved in order to commit or abort the database changes and to release database locks. If Db2 is a coordinator for an RRS unit of recovery, Db2 knows the commit or abort decision but cannot communicate this information to the RRS-compliant resource manager that has an indoubt unit of recovery.
- If Db2 performs a conditional restart and loses information from its log, inconsistent Db2 managed data might exist.
- In a Sysplex, if Db2 is restarted
on a z/OS system
where RRS is not installed, Db2 might
have indoubt threads.
This is a user error because RRS must be started on all processors in a sysplex on which RRS work is to be performed.
Both Db2 and RRS can display information about indoubt units of recovery. Both also provide techniques for manually resolving these indoubt units of recovery.
In Db2, the DISPLAY THREAD command provides information about indoubt Db2 thread. The display output includes RRS unit of recovery IDs for those Db2 threads that have RRS either as a coordinator or as a participant. If Db2 is a participant, you can use the RRS unit of recovery ID that is displayed to determine the outcome of the RRS unit of recovery. If Db2 is the coordinator, you can determine the outcome of the unit of recovery from the DISPLAY THREAD output.
In Db2, the RECOVER INDOUBT command lets you manually resolve a Db2 indoubt thread. You can use RECOVER INDOUBT to commit or roll back a unit of recovery after you determine what the correct decision is.
RRS provides an ISPF interface that provides a similar capability.