MCITP

MCITP

Tuesday, October 6, 2015

Why MSDTC

MSDTC (aka Microsoft Distributed Transaction Control/co-ordinator) is a piece of software which is used in both standalone and Cluster environment, but user don’t really know what it does, or how it works.
MSDTC is used by SQL Server and other applications when they want to make a distributed transaction between more than one machines.  A distributed transaction is simple a transactions which spans between two or more machines.  The basic concept is that machine 1 starts a transaction, and does some work.  It then connects to machine 2 and does some work.  The work on machine 2 fails, and is candled.  The work on machine 1 needs to then be rolled back.
If you are going from one instance to another on the same server DTC will not be needed.  If you are going from one instance to another within a cluster you will want to have DTC available as you may have to go between nodes of the cluster as you have no guarantee that the instances will be on the same physical node.

MSDTC is not required for a SQL Server 2008 & 2012 onwards fail over cluster. However, if you plan to use Linked Servers, then you will need to create a clustered MSDTC resource. The good news is that can be setup after the cluster is already built and after SQL Server has been installed.

If you use distributed transactions you need MSDTC. It’s also used in transactional replication with updateable subscriptions and immediate updates. Linked Servers & Remote stored procs use MSDTC
The Microsoft Distributed Transaction Coordinator service (MSDTC) coordinates transactions, regardless of failures that may occur during the process, so that the work is committed as a single transaction even if the work spans multiple resource managers on multiple computers.
MSDTC is a Windows service. By default, the service is configured as a manual service rather than as an automatic service. However, most applications demand-start the service as needed. If necessary, the administrator can start the service with the Services administrative tool.

Requirement to Add MSDTC in cluster:
-----------------------------------------------------------
  • 1.    You must add an MS DTC resource to a cluster group. This group can be either an existing cluster group or a new group that you define.
  • 2.    An MS DTC resource has two resource dependencies: a physical disk and a network name. You must ensure that these MS DTC dependencies reside in the same group as the MS DTC resource.
  • 3.    The log file must reside on a disk that is shared by all nodes in the cluster.
  • 4.    One or more nodes in the cluster must be identified as owners of the MS DTC resource.

No comments:

Post a Comment