Interactive Recovery of Distributed Transactions
This topic describes how to manually recover distributed transactions in the event of the Microsoft Distributed Transaction Co-ordinator (MDTC) failing to complete the automatic recovery process.
rxaserver Command
Distributed transactions are not the responsibility of the local Reality Transaction Manager; they are managed remotely by the MDTC. (Refer to the topic Distributed Transactions).
If, following a system failure, the raw log contains prepared transactions for which the MDTC has not issued a request to rollback or commit; Reality databases on the system (all of which need access to the raw log) will remain locked to users. If the MDTC?s automatic recovery process fails to complete, the rxaserver command allows you to manually commit or rollback prepared transactions.
Caution
In order to make the decision to rollback or commit a prepared transaction, you must have information about the state of all other systems participating in that transaction.
At the UNIX or Windows prompt, execute the following command to list all distributed transactions in the raw log:
rxaserver -l
Transaction 001 of 002
======================
Database : d:\dbases\live DbKey : 1 Port : 401 Pid : 1896
Status : ACTIVE Started: 11:33 Offset: 0x08a18a00 Flags: 0x02
XID : XA Transaction Identifier
FormatID : 0x4478019 Gtrid : 48 Bqual : 16
Data : 9FB37754665F574D819A550FC9CAF9602364B472884F3F4EBA08302B03D699B1
990B2E20B08A9C479BDABA08BC1C1FBD0B8F02E2CC317D41B1B6F4E260D0FDCD
Transaction 002 of 002
======================
Database : d:\dbases\live DbKey : 1 Port : 404 Pid : 2073
Status : PREPARED Started: 11:35 Offset: 0x08a1C800 Flags: 0x82
XID : XA Transaction Identifier
FormatID : 0x4478019 Gtrid : 48 Bqual : 16
Data : F6737754665F574D819A550FC9CAF5102364B472884F3F4EBA08302B03D699B1
990B2E20B08A9C479BDABA08BC1C1FBD0B8F02E2CC317D6AB109C2AAF020DE79
Execute the following command to run the manual recovery process:
rxaserver -r
The recovery process displays each prepared transaction in turn, giving you the option to abort or commit.
Transaction 001 of 001 ====================== Database : d:\dbases\live DbKey : 1 Port : 404 Pid : 2073 Status : PREPARED Started: 11:35 Offset: 0x08a1C800 Flags: 0x82 XID : XA Transaction Identifier FormatID : 0x4478019 Gtrid : 48 Bqual : 16 Data : F6737754665F574D819A550FC9CAF5102364B472884F3F4EBA08302B03D699B1 990B2E20B08A9C479BDABA08BC1C1FBD0B8F02E2CC317D6AB109C2AAF020DE79 Enter 'I'gnore (default), 'A'bort, 'C'ommit :C
You are about to Commit transaction 1 do you want to continue? <Y/N> :Y
Operation to Commit transaction 1 was successful, result 0