To determine if data integrity has been affected by an
inconsistently implemented global transaction, you must reconstruct
the global transaction and determine which parts of the transaction
were committed and which were rolled back. Use the onlog utility
to obtain the necessary information. The procedure is as follows:
- Reconstruct the transaction at the participant that contains
the HEURTX record.
- A participant database server logical log is the starting
point for your information search. Each record in the log has a local
transaction identification number (xid). Obtain the xid of
the HEURTX record.
- Use the local xid to locate all associated log
records that rolled back as part of this piece of work.
- Determine which database server acted as coordinator for
the global transaction.
- Look for the PREPARE record on the participant that
contains the same local xid. The PREPARE record marks the start
of the two-phase commit protocol for the participant.
- Use the onlog -l option to obtain
the long output of the PREPARE record.
- Obtain a list of the other participants from the coordinator
log.
- Examine the log records on the coordinator database
server. Find the BEGPREP record.
- Examine the long output for the BEGPREP record.
If the first 32 bytes of the GTRID in this record match the
GTRID of the participant, the BEGPREP record is part of the same global
transaction. Note the participants displayed in the ASCII part of
the BEGPREP long output.
- Reconstruct the transaction at each participant.
- At each participant database server, read the logical
log to find the PREPARE record that contains the GTRID associated
with this transaction and obtain the local xid for the piece
of work performed by this participant.
- At each participant database server, use the local xid to
locate all logical-log records associated with this transaction (committed
or rolled back).
After you follow this procedure, you know what all the
participants for the transaction were, which pieces of work were assigned
to each participant, and whether each piece of work was rolled back
or committed. From this information, you can determine if the independent
action affected data integrity.