Share via


One-Pipe Resource Manager Commit Phase 1—Prepare

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

  1. When ITransaction::Commit is called, the transaction manager initiates phase one of the two-phase commit process. The transaction manager determines which ODBC drivers have enlisted in the transactions and sends a prepare message, in parallel, to the DTC proxy of each ODBC driver.

  2. The transaction manager awaits notification from all of the enlistees involved in the transaction that they have completed their prepare work.

  3. Each DTC proxy invokes the ODBC drivers ITransactionResourceAsync::PrepareRequest method to inform the ODBC driver that it should perform phase one of the two-phase commit protocol.

  4. Each ODBC driver should immediately respond to the PrepareRequest to acknowledge its receipt.

  5. The ODBC driver sends an xa_prepare_entry message to the resource manager.

  6. The resource manager prepares and then replies to the xa_prepare_entry message.

  7. The ODBC driver receives the reply to the xa_prepare_entry message and invokes ITransactionEnlistmentAsync::PrepareRequestDone to inform the DTC proxy that it has completed the prepare phase of the two-phase commit protocol.

  8. The DTC proxy informs the transaction manager that the ODBC driver has completed phase one.

  9. When all of the ODBC drivers on the system complete phase one, the transaction manager writes a prepared record to its log file. Phase one is now complete.