Condividi tramite


Resolve Transactions Manually

Applies To: Windows Server 2008

Occasionally, you may have to force transactions to commit or abort to release locks and make database resources available to other network users and applications. You can use this procedure and the Component Services snap-in to resolve transactions manually.

Membership in Administrators, or equivalent, is the minimum required to complete these procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).

To resolve transactions manually

  1. Open the Component Services snap-in.

    To open Component Services, click Start. In the search box, type dcomcnfg, and then press ENTER.

  2. In the console tree, double-click the computer (such as My Computer for the local computer) for which you want to view the transaction list.

  3. Double-click the Distributed Transaction Coordinator folder, and then locate the DTC for which you wish to resolve transactions manually.

    • To select the local DTC instance, click to open Local DTC, and then click Transaction List.

    • To select a clustered DTC instance, click to open Clustered DTCs, locate the clustered DTC by name, click to expand its contents, and then click Transaction List.

  4. In the details pane, right-click the transaction that you want to resolve; point to Resolve; and then click Commit, Abort, or Forget.

The In Doubt state indicates that the transaction is on a subordinate Distributed Transaction Coordinator (DTC) and that the superior DTC is not accessible. In this situation, we recommend that you verify the connection between the computers that are involved in the transaction. First, verify network connectivity between the two computers, and, if there is a firewall involved, verify that an exception for the DTC is enabled on the firewall. For more information, see Enable Firewall Exceptions for MS DTC.

Resolving the In Doubt state

The In Doubt state indicates that a transaction is managed by a different DTC. The transaction is prepared, but a commit or abort decision is not received yet, indicating that the coordinating DTC is not accessible. You can force a transaction in this state to either commit or abort, using the following procedure to resolve the transaction manually.

In this situation, we recommend that you verify the connection between the computers. First, verify network connectivity between the two computers, and if there is a firewall involved, verify that an exception for the DTC is enabled on the firewall. For more information, see Enable Firewall Exceptions for MS DTC.

To resolve a transaction in the In Doubt state

  1. Use the Transaction List to locate the in-doubt transaction's immediate parent. For information about viewing transaction properties, see View Transaction Information.

  2. Locate the superior DTC system. To do this, you need to know the topology for the application that is using the transaction. Use the Transaction List on that computer where the superior DTC is running to determine the outcome of the in-doubt transaction, as follows:

    • If the transaction does not appear on the Transactions page, the transaction has been aborted and you can abort the transaction on the subordinate system manually.

    • If the transaction appears on the superior DTC system as Cannot Notify Commit, the transaction has committed and you can commit the transaction on the subordinate system manually.

    • If the transaction appears on the superior DTC system as Cannot Notify Abort, the transaction has aborted and you can abort the transaction on the subordinate system manually.

    • If the transaction is shown as In Doubt on the superior DTC system, use the Transactions page on that system to locate the transaction's next immediate superior. Continue to follow the transaction up the commit tree until you locate the superior system on which the transaction is not shown (indicating that it aborted), is in the Cannot Notify Abort state (indicating that it aborted), or is in the Cannot Notify Commit state (indicating that it committed). If the transaction is aborted on the superior DTC system, manually force the transaction to abort on that computer's immediate subordinate. If the transaction is committed on the superior system, manually force the transaction to commit on the subordinate system. Follow this method all the way down the transaction tree until all transactions are resolved.

  3. When you have either manually committed or manually aborted the transaction on the subordinate system, manually force the immediate superior to forget the transaction. This deletes the transaction from its local Microsoft Distributed Transaction Coordinator (MS DTC) log file.

Resolving the Cannot Notify Abort state

The Cannot Notify Abort state indicates that the transaction has aborted but that a subordinate transaction manager has not been notified of the transaction's outcome. You can use the following procedure to resolve the transaction manually.

Warning

Do not manually forget a transaction until all subordinate DTCs have been notified of the transaction outcome. Otherwise, the result might be corruption or loss of transaction related data.

To display a transaction in the Cannot Notify Abort state

  1. Open the Component Services snap-in, and navigate to the transaction list for the transaction in question. For more information, see the procedure "To resolve transactions manually" earlier in this section.

  2. In the Transaction List dialog box, right-click the transaction that is in the Cannot Notify Abort state. This displays the superior DTC and subordinate transaction managers for the transaction.

  3. After you locate the subordinate transaction managers, force the transaction to abort on each of the subordinate systems.

  4. When you have manually aborted the transaction on all subordinate systems, return to the DTC that shows the transaction in the Cannot Notify Abort state, and then force that DTC to forget the transaction.

Resolving the Cannot Notify Commit State

The Cannot Notify Commit state indicates that the transaction has committed but that some subordinate DTC transaction managers or resource managers have not been notified of the transaction's outcome. You can use the following procedure to resolve the transaction manually.

Warning

Do not manually forget a transaction until all subordinate DTCs have been notified of the transaction outcome. Otherwise, the result might be corruption or loss of transaction related data.

To display a transaction in the Cannot Notify Commit state

  1. Open Component Services and navigate to the transaction list for the transaction in question. For more information, see the procedure "To resolve transactions manually" earlier in this section.

  2. In the Transaction List, right-click the transaction that is in the Cannot Notify Commit state. This displays the superior DTC and subordinate transaction managers for the transaction.

  3. After you locate the subordinate transaction managers, force the transaction to commit on each of the subordinate systems.

  4. When you have manually committed the transaction on all subordinate systems, return to the DTC that shows the transaction in the Cannot Notify Commit state, and then force that DTC to forget the transaction.

Note

There can be more than one computer operating as a subordinate DTC. Make sure to manually resolve the transaction on all subordinates before you force the superior system to forget the transaction.