SQLRx® Tip of the Month
 
October 2016
______________________________________________________________________________
SQL 2008

SQL Server Administration: AlwaysOn Enhancement - DTC Support
 -by Ginger Keys
 
 
*Only available with Windows Server 2016 or Windows Server 2012 R2 with update KB3090973
Distributed Transaction Coordinator (DTC) is necessary if your client application needs to perform transactions across multiple instances.   DTC is part of the operating system, and ensures consistency when your database engine makes multi-server transactions. Applications can use DTC when they connect to the database engine, or can be started through TSQL by using the BEGIN DISTRIBUTED TRANSACTION command.
USE AdventureWorks2012;
GO
BEGIN DISTRIBUTED TRANSACTION;
-- your tsql statement here
DELETE FROM AdventureWorks2012.HumanResources.JobCandidate
   WHERE JobCandidateID = 13;
GO
COMMIT TRANSACTION;
GO
 
Not only can your application perform transactions between multiple SQL Server instances, but also between other DTC compliant servers such as WebSphere or Oracle.
DTC is not supported in AlwaysOn 2014 and earlier. You cannot add DTC support to an already existing AlwaysOn availability group. For complete information click here https://msdn.microsoft.com/en-us/library/mt748186.aspx.
To implement this in AlwaysOn 2016, Availability Groups must be created with the CREATE AVAILABILITY GROUP command and the WITH DTC_SUPPORT = PER_DB clause.  
The clauses in the TSQL script above are only a partial list of available options, just for demonstration purposes. For more information on creating availability groups click here https://msdn.microsoft.com/en-us/library/ff878399.aspx.
___________________________________________________________________________
SQLRx has worked hard to minimize the impact of monitoring SQL Servers to the point that we are able to monitor high transaction systems with little impact (1% load) on the target system. Contact us today to help you monitor your SQL servers!
Be sure to check out our blog for more SQL Server information.

If you have a SQL question you'd like us to answer, and possibly use for the next SQLRx Tip of the Month, email it to us!  If you missed any of our previous tips, you can view them here.

For assistance or more information on optimizing your SQL Server Environment, visit us at www.sqlrx.com or email me at lorib@sqlrx.com.


 

Phone: 214.526.7680 x 113

Toll free:  800.85.SQLRx  (x113)

blog.sqlrx.com

@SQLRx

LinkedIn

Facebook
 


 

Integrated Services, Inc.                                    
2008 winner logo small
Turning Data Into Profit


 

30 Years of Credibility & Trust


 

Join our email list          Check out our events