MS DTC needs to be installed under most SQL Servers, except that installing the database engine or analysis service does not install DTC. If you need to use distributed transactions later, you can install the DTC after the SQL Server cluster installation is complete.
One, the cluster MS DTC installation
Similar to the normal Add Cluster service in Failover Manager, right-click Services and Applications à Configure services and applications.
You need to assign an IP to the DTC. As shown, this is a cross-subnet cluster, so you want to configure two virtual IPs.
When installing the DTC, it is best to use a separate shared disk to prevent DTC data from affecting the use of database storage disk data. As shown
Second, MS DTC failover mode
Similar to SQL Server service failover, when a cluster specifies a node's DTC failure, the DTC service is transferred to the other node through quorum. IP and disk resources will also be re-bound to the new node.
On the new node, the restarted DTC reads the log file of the DTC on the shared disk to determine which transactions were not processed and which were recently resolved. As shown, the DTC operates on the b node, and if the B node fails and the server is transferred to the a node, the DTC transaction manager will continue to read the shared disk DTC Log and re-operate.
third, cluster MSDTC with local MSDTC
Windows 2003 and previous versions only support the creation of an MSDTC instance on the entire Windows cluster, but one MSDTC has the following drawbacks:
- Isolation is not good because all applications share a separate DTC
Because all applications or services share the same DTC, other applications and services cannot access the DTC when the DTC is unavailable because of an application failure
- Poor performance
Performance may not be ideal, such as when the DTC needs to process a distributed thing that is not in the application on this node, the DTC delay time may exceed the maximum time that the application tolerates, resulting in a service timeout or failover.
The Windows Server 2008 Failover cluster installs multi-site DTC and provides proactive/proactive support with the following benefits:
- Application failures in one cluster do not affect applications in other clusters.
- Performance delay Problem Mitigation
Each node can have a very close DTC resource. Mitigate the effects of delays.
Local MSDTC
All nodes of the cluster can install the local DTC independently, as shown in the cluster group MYCLUSTERGRP1 has its own default DTC and local DTC.
multiple MSDTC
A cluster group can also install multiple DTC instances, and you can set up each cluster application to correspond to its own DTC resource. As shown, in general, if the cluster application has its own DTC resource, the DTC is used to distribute the transaction. If not, the other DTC in the cluster resource is used, if not in the cluster group, The local DTC is used.
MS DTC distributed Transaction Coordinator in a cluster