Resource Manager Implicitly Initiated Transactions

Some OLE Transactions resource managers may want to implicitly initiate MS DTC transactions on behalf of an application. For example, Microsoft SQL Server implicitly initiates MS DTC transactions when needed by a stored procedure.

There may be other uses for implicitly initiated MS DTC transactions. For example, a database system might automatically initiate an MS DTC transaction when no distributed transaction is in force and a stored procedure in one database system invokes a remote stored procedure in another database system. By doing this, the database system protects the work done in both databases using a single distributed transaction.

Resource manager implicitly initiated transactions are advantageous for four reasons:

  1. Simplifies application programming—resource managers automatically initiate distributed transactions when required.
  2. Permits existing stored procedures to exploit MS DTC transactions. For example, Microsoft SQL Server starts an MS DTC transaction when a stored procedure calls the existing Transact-SQL BEGIN TRANSACTION statement and the database administrator has enabled the Remote Procedure Transactions option.

The Remote Procedure Transactions option controls whether SQL Server initiates an MS DTC distributed transaction or an existing SQL Server local transaction. The option is present for compatibility. When the option is reset, which it is by default, the old behavior is preserved and no MS DTC transaction is initiated. When the option is set, SQL Server starts an MS DTC transaction.

  1. Lowers the cost of committing a transaction when the resource manager begins and commits the transaction. When the resource manager initiates the MS DTC transaction, the transaction manager on the resource manager’s system always acts as the transaction coordinator. This can reduce the cost of committing the transaction because the transaction manager on the client application's system need not participate in the two-phase commit protocol.
  2. Minimizes setup and administration because there is no need to install MS DTC on client machines.