Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, November 29, 2019 7:01 AM
Problem:
- MSDTC service has been started. But debuged .net console program and still got one error "MSDTC on server 'XXXXX' is unavailable.". And check sql server log is "The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service."
- I have already restarted my laptop again and again. And try to others' solutions to fix this problem, but they didn't work.
Environment:
- OS: Windows 10 Pro x64
- SS version: Microsoft SQL Server 2014 (SP1-GDR) (KB4019091) - 12.0.4237.0 (X64) Jul 5 2017 22:03:42 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 18362: )
- Program: .net console program use multiple dbcontexts
- Program and SQL Server 2014 are both installed in local(windows 10 pro)
MSDTC & firewall configurations details:
1. MSDTC service has been started and set startup type to automatic
2. Component Service => Computers => My Computer => Distributed Transaction Coordinator => Local DTC properties => Security Tab:
Check Network DTC Accesss, Allow Remote Clients, All Remote Administration, Allow Inbound, Allow Outbound, No Authentication Reuqired, Enable XA Transactions, Enable SNA LU 6.2 Transactions.
DTC Logon Account use Network Service.
3. close firewall
4. firewall allow Distributed Transaction Coordinator app
5. firewall advanced settings inbound and outbound add 135 port and msdtc.exe
6. success to execute subinacl: subinacl /service msdtc /grant="Network Service"=QSETIL
7. Sql server instance properties => connections, checked Require distributed transactions for server-to-server communication
.net console program:
Error Message: MSDTC on server 'L-CHAOYANG' is unavailable.
Code:
using (var tt = new TransactionScope())
{
var a = new AGMEntities();
var b = new AGMAdminEntities(); // 2 dbcontexts are both in local sql server 2014
var users = a.USERs.ToList();
var logins = b.LOGINs.ToList(); // this line throw exception message:MSDTC on server 'L-CHAOYANG' is unavailable.
}
Console.WriteLine();
Sql Server error message:
The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.
All replies (4)
Tuesday, December 3, 2019 8:38 AM
Hi,
Microsoft have released an official article about same issue *MSDTC on server ‘servername’ is unavailable, *We recommend to refer the article and check the suggestion action in it.
Intermittent Error: MSDTC on server ‘servername’ is unavailable
As the issue is more related with SQL server, please contact with SQL support, they should have more resources and more familiar with this issue.
Bests,
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].
Thursday, December 5, 2019 1:51 AM
Hi,
If my information is useful for you, please mark is as answer.
Bests,
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].
Saturday, December 7, 2019 2:39 PM
Hi Joy-Qiao,
Thanks for your feedback.
I found this article https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install/error-code-8004e00f-com-was-unable-to-talk-to-the/f32b5cd3-e502-4bd0-a305-3b3029430ec0?page=4
I believe it's not sql server's issue, but still no better solution to fix it and now seems just reinstalling windows. And don't install updates
Wednesday, December 11, 2019 9:52 AM
Hi,
Thank you for your sharing.
It would be useful for other customers who encounter same issue with you.
If you need any professional support on log and process analysis, we recommend to create a ticket with the link below to go deep of the issue.
Bests,
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].