snippetsqlMinor
How can I log which queries are in a distributed transaction on an MS SQL server?
Viewed 0 times
canlogaresqlserverdistributedtransactionhowwhichqueries
Problem
I am looking at migrating a database from a self-hosted cluster to Microsoft Azure SQL. I am aware that there are a few distributed transactions involved, which isn't supported on Azure SQL.
Is there a way that I can log all distributed transactions and their queries, so that I can inspect the client application and remove the requirement for distributed transactions?
Is there a way that I can log all distributed transactions and their queries, so that I can inspect the client application and remove the requirement for distributed transactions?
Solution
You should be able to track the DTCTransaction event in SQL Trace or XEvents.
Or you could just shut down MSTDC (not in production, of course) and see what fails.
Also note that updates to .NET's SqlClient enables some distributed transaction scenarios with Azure SQL Database without MSDTC. See
Distributed transactions across cloud databases
Or you could just shut down MSTDC (not in production, of course) and see what fails.
Also note that updates to .NET's SqlClient enables some distributed transaction scenarios with Azure SQL Database without MSDTC. See
Distributed transactions across cloud databases
Context
StackExchange Database Administrators Q#267382, answer score: 5
Revisions (0)
No revisions yet.