Product Environment 9-37
Heuristic Rollback
It is important to recognize that this rollback does not close the transaction as it
would ina single OnLine environment. Under two-phase commit, the logical log
files that contain records associated with the piece of work are considered
open until an ENDTRANS logical log record is written. (Refer to page 9-44 for
more details about the logical log records during the two-phase commit
protocol.)
It is quite possible that the logical log will continue to fill until the exclusive
high-water mark is reached (LTXEHWM). If this happens, all database server
processes are suspended except those that are currently rolling back or
currently committing. In the two-phase commit scenario, the open trans-
action prevents you from backing up the logical log files and freeing space in
the logical log. Under these specific circumstances, the logical log can fill
completely.If this happens, OnLineshuts down and you must perform a data
restore.
Condition 2: You Execute tbmode -z
You, as administrator, can decide to initiate a heuristic rollback of a precom-
mitted piece of work by executing tbmode -z. You might make this decision
because you want to free the resources that are held by the piece of work. (If
you kill the database server process by executing tbmode-z, you free all locks
and shared-memory resources that are held by the database server process
even though you do not end the transaction.) The likely consequence of this
action is that the coordinator will eventually contact the participant, learn of
the heuristic rollback, and direct the participant to end the transaction
without an interruption in processing. However, you are strongly advised to
consider the other, less likely consequence (manual recovery) before you take
this action.
When a Heuristic Rollback Occurs
When a heuristic rollback occurs at a participant OnLine, a record is placed
in the OnLine logical log (type HEURTX) where the rollback occurred. Locks
and resources held by the transaction are freed. The tbinit daemon writes a
message in the OnLine message log indicating that a long-transaction
condition and rollback occurred. (Refer to page 8-29 for a complete
description of the message.)
Transaction Completed Abnormally (rollback):
tx=address flags=0xnn