Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions Links


SQL Server DBA Jobs

How to enable MSDTC XA transactions with Powershell

01 October,2018 by Tom Collins

Question: I've read your post on Enable XA transactions for SQL Server    , which outlines how to enable XA transactions via the Computer Services module. I'd like to integrate the enabling of XA transactions as part of a scripted   SQL Server installation, whoch includes enabling XA transactions for some applications.

I'm using Powershell to develop the script . How can I see the current value and also change the value to enable XA ?

Answer:   It is possible to access and set the MSDTC  XA Transactions values using Powershell . You need to make sure your current login has the correct permissions.

To view the current XA transactions value use the following Get-ItemProperty  command

Get-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\MSDTC\\Security\\" -Name "XaTransactions"

To enable the current XA transactions use the following Set-ItemProperty

Set-ItemProperty "HKLM:\\SOFTWARE\\Microsoft\\MSDTC\\Security\\" -Name "XaTransactions"


Read More on MSDTC

Unable to connect to Microsoft Distributed Transaction Coordinator ...

SQL Server – Deleting Distributed Orphaned Transactions

MS DTC and sys.dm_tran_active_transactions (SQL Server DBA)

Author: Tom Collins (


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on How to enable MSDTC XA transactions with Powershell | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer