Blog Post

Azure SQL Blog
2 MIN READ

Distributed Transaction Coordinator for Azure SQL Managed Instance

sasapopo's avatar
sasapopo
Icon for Microsoft rankMicrosoft
Nov 16, 2022

[Edit 11/21/2023 - DTC for SQL MI is GA. Learn more at aka.ms/sqlmi-dtc]

 

With Distributed Transaction Coordinator (often called DTC or MS DTC) for Azure SQL Managed Instance, you can run distributed transactions in mixed environments. This means support for distributed transactions across managed instances, SQL Servers, other RDBMSs, and other applications hosted in any environment where network connectivity towards Azure can be configured.

Whether you’re using ODBC or JDBC driver, XA transactions, or T-SQL or .NET based distributed transactions, it’s all supported with Azure SQL Managed Instance.

 

Support for DTC and distributed transaction scenarios enables you to migrate your applications from on-prem and IaaS environments and modernize them. You can also develop new, modern, mission critical apps that require transactional consistency across complex architectures.

 

DTC for managed instance is part of the November 2022 feature wave. To learn more about the timelines for the feature wave rollout, see the feature wave materials here.

 

To support various distributed transaction scenarios in truly heterogenous environments, we rely on the Windows DTC service, and with managed instance, the DTC becomes managed DTC. This means that on the backend side, we take care of the DTC log and availability, so you don’t have to think about it ever again.

 

For distributed transactions to work in mixed environments, there needs to be network connectivity. For example, to run distributed transactions across application and database server hosted on premises and Azure SQL Managed instances, you need to connect your on-prem network with managed instance Azure VNet and that’s typically done with point-to-site-VPN or ExpressRoute. For more details on how to setup point-to-site-VPN, check out this great step by step guide.

 

As DTC supports only NetBIOS protocol which is not actually supported in Azure networking nor could work in mixed environments, we have developed a way to make things work with a bit of help of DNS name servers. In both managed instance environment and external environment (anything that’s not managed instance is considered external), DNS suffix search list should be configured and with that, host names can be resolved to IP addresses, and DTC in managed instance environment and external environment can communicate. DNS configuration is not needed if distributed transactions are executed between managed instances under the same Azure Subscription, or for XA transactions in general, and that includes XA transactions between managed instances or in mixed environments.

DNS and networking diagram for managed instance DTC

 

If your use cases require T-SQL or .NET distributed transactions between managed instances only, then you actually don’t need to configure DTC, as these scenarios are natively supported by managed instance. The only thing you need to configure is Server Trust Group.

We’re looking forward to seeing your distributed transactions running on Azure SQL Managed Instance!

 

P.S. To learn more about many other managed instance announcements happening now, see this blog post.

 

Updated Nov 20, 2023
Version 4.0
No CommentsBe the first to comment