There is two SQL servers and DTC is enabled both of them.
One SQL server is local and another one is a linked server named test.
Run a Distributed Transaction in SQL server for test purpose:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
USE AdventureWorks2014; Select * from [AdventureWorks2014].[Production].[WorkOrder] where WorkOrderID <100 USE AdventureWorks2014; GO SET XACT_ABORT ON BEGIN DISTRIBUTED TRANSACTION; -- Delete candidate from local instance. DELETE [AdventureWorks2014].[Production].[WorkOrder] WHERE WorkOrderID = 2; -- Delete candidate from remote instance. DELETE test.[AdventureWorks2014].[Production].[WorkOrder] WHERE WorkOrderID = 2; COMMIT TRANSACTION; GO |
after running the T-SQL transaction you can check in the DTC report.
you can check the DTC connection and firewall settings:
DTC ping tool
In powershell:
1 2 3 4 5 |
Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -Verbose Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "SERVER0058" -ResourceManagerPort 17100 -Verbose Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "SERVER0059" -ResourceManagerPort 17100 -Verbose Test-Dtc -RemoteComputerName "SERVER0059" -ResourceManagerPort 17100 -Verbose Test-Dtc -LocalComputerName "$env:COMPUTERNAME" -RemoteComputerName "APPSERVER418" |
If the remote server is another domain, you will get an error:
New-CimSession : WinRM cannot process the request. The following error with errorcode 0x80090322 occurred while using Kerberos authentication: An unknown security error occurred.
In this case you can set: No Authentication Required.