Share via


Distributed Transactions

Distributed transaction processing (TP) systems are designed to facilitate transactions that span heterogeneous, transaction-aware resources in a distributed environment. Supported by a distributed TP system, your application can combine into a transactional unit such diverse activities as retrieving a message from a Message Queuing queue, storing the message in a Microsoft SQL Server database, and removing all existing references to the message from an Oracle Server database. Because they span multiple data resources, it is important that distributed transactions enforce the ACID properties to maintain data consistency across all resources.

A distributed TP system consists of several cooperating entities, as described in the sections that follow. These entities are logical and can reside on the same computer or on different computers.

Transaction Processing (TP) Monitors

A TP monitor is software that sits between a transaction-aware application and a collection of resources. It maximizes operating system activities, streamlines network communications, and connects multiple clients to multiple applications that potentially access multiple data resources.

Instead of writing an application that manages a multiuser, distributed environment, you write an application that consists of single transaction requests. The monitor scales your application as required.

The Distributed Transaction Coordinator (DTC) is the TP monitor for Microsoft Windows 2000.

Transaction Managers

In a distributed transaction, each participating resource has a local transaction manager (TM) to track incoming and outgoing transactions on that computer. The TP monitor assigns one TM the additional task of coordinating all activities among local TMs. The TM that coordinates transaction activities is called the root or coordinating TM.

A TM coordinates and manages all transaction processing functions, but it is not equipped to manage data directly. Resource managers handle data-related activities.

Resource Managers

A resource manager is a system service that manages persistent or durable data in databases, durable message queues, or transactional file systems. The resource manager stores data and performs disaster recovery.

SQL Server and Message Queuing provide resource managers that participate in distributed transactions. Oracle, Sybase, Informix, IBM (for IBM DB2), and Ingres also provide compatible resource managers for their database products.

Resource Dispensers

A resource dispenser manages nondurable state that can be shared. For example, the Open Database Connectivity (ODBC) resource dispenser manages pools of database connections, reclaiming each connection when it is no longer needed.

See Also

Transaction Processing Fundamentals