Difference between revisions of "HowTo:Solve MSDTC-related problems"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
From version 4 on, {{UBIK}} uses the Distributed Transaction Coordinator (MSDTC or DTC) to manage database transactions. However, there's the necessity for correct configuration on both the database server as well as the application server to make it work. This article explains how to do that. | From version 4 on, {{UBIK}} uses the Distributed Transaction Coordinator (MSDTC or DTC) to manage database transactions. However, there's the necessity for correct configuration on both the database server as well as the application server to make it work. This article explains how to do that. | ||
+ | |||
+ | {{hint|On Microsoft Azure SQL Database services, MSDTC is not supported - but apparently, it's not needed either (as documented [[https://learn.microsoft.com/en-us/azure/azure-sql/database/elastic-transactions-overview?view=azuresql here]]). So If you don't face any problems this article can be ignored when working with Azure SQL Database.}} | ||
+ | |||
== Problem Symptoms == | == Problem Symptoms == | ||
Line 17: | Line 20: | ||
* [https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/enable-network-dtc-access?source=recommendations Enable Network DTC Access (learn.microsoft.com)] | * [https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/enable-network-dtc-access?source=recommendations Enable Network DTC Access (learn.microsoft.com)] | ||
+ | Use the following steps to configure DTC network access: | ||
* Open the "Component Services" console (typing that into the Windows start menu should find you the right app) | * Open the "Component Services" console (typing that into the Windows start menu should find you the right app) | ||
* In the Component Services console, you should see a tree view to the left. | * In the Component Services console, you should see a tree view to the left. | ||
Line 75: | Line 79: | ||
* [https://learn.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2022-ps Powershell New-NetFirewallRule (learn.microsoft.com)] | * [https://learn.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2022-ps Powershell New-NetFirewallRule (learn.microsoft.com)] | ||
− | = | + | = Testing = |
+ | |||
+ | There are several tools you can use to test the correct configuration and function of the MSDTC on both your client and the host machine. | ||
+ | |||
+ | {{hint|It might pay off to check whether the "Distributed Transaction Coordinator" (MSDTC) Windows Service is running on the database server. You may wish to set the startup type to "Automatic". If it cannot be started, please check the Event Manager for errors.}} | ||
=== Test-Dtc === | === Test-Dtc === | ||
Line 94: | Line 102: | ||
{{hint|The DTCPing program has to run on both the host and the client machine.}} | {{hint|The DTCPing program has to run on both the host and the client machine.}} | ||
<!-- DO NOT REMOVE THIS -->{{Template:HowTo/End}}<!-- DO NOT REMOVE THIS --> | <!-- DO NOT REMOVE THIS -->{{Template:HowTo/End}}<!-- DO NOT REMOVE THIS --> | ||
+ | |||
+ | = See also = | ||
+ | * [https://stackoverflow.com/questions/7694/how-do-i-enable-msdtc-on-sql-server How do I enable MSDTC on SQL Server (StackOverflow)] | ||
+ | * [https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/enable-network-dtc-access?source=recommendations Enable Network DTC Access (learn.microsoft.com)] | ||
+ | * [https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/configure-dtc-to-work-through-firewalls Configure DTC to work through firewalls (learn.microsoft.com)] using custom port range (recommended only if necessary!) | ||
+ | * [https://learn.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2022-ps Powershell New-NetFirewallRule (learn.microsoft.com)] | ||
+ | * [https://learn.microsoft.com/en-us/powershell/module/msdtc/test-dtc?view=windowsserver2022-ps&source=recommendations Test-Dtc (learn.microsoft.com)] | ||
+ | * [https://learn.microsoft.com/en-us/troubleshoot/windows-server/application-management/ms-dtc-connectivity-issues?source=recommendations Trouble-shoot MSDTC connectivity issues (learn.microsoft.com)] | ||
+ | * [https://puneet-gupta.github.io/puneetgupta/2008/11/12/troubleshooting-msdtc-issues-with-the-dtcping-tool/ Trouble-shooting MSDTC issues with DTCPing (puneet-gupta.github.io)] | ||
[[Category:Database|Solve MSDTC-related problems]] | [[Category:Database|Solve MSDTC-related problems]] |
Latest revision as of 08:36, 25 August 2023
From version 4 on, UBIK® uses the Distributed Transaction Coordinator (MSDTC or DTC) to manage database transactions. However, there's the necessity for correct configuration on both the database server as well as the application server to make it work. This article explains how to do that.
On Microsoft Azure SQL Database services, MSDTC is not supported - but apparently, it's not needed either (as documented [here]). So If you don't face any problems this article can be ignored when working with Azure SQL Database. |
Problem Symptoms
- UBIK® Studio or a UBIK® service can't connect to your database or fails to create a session
- Database view creation or instance data transfer doesn't work because of an exception
- There's an error/exception log entry like: "Communication with the underlying transaction manager has failed"
Solution
See also
- How do I enable MSDTC on SQL Server (StackOverflow)
- Enable Network DTC Access (learn.microsoft.com)
- Configure DTC to work through firewalls (learn.microsoft.com) using custom port range (recommended only if necessary!)
- Powershell New-NetFirewallRule (learn.microsoft.com)
- Test-Dtc (learn.microsoft.com)
- Trouble-shoot MSDTC connectivity issues (learn.microsoft.com)
- Trouble-shooting MSDTC issues with DTCPing (puneet-gupta.github.io)