如何在 SQL Server 上启用 MSDTC? [英] How do I enable MSDTC on SQL Server?

查看:83
本文介绍了如何在 SQL Server 上启用 MSDTC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这甚至是一个有效的问题吗?我有一个使用 MSTDC 的 .NET Windows 应用程序,它抛出异常:

Is this even a valid question? I have a .NET Windows app that is using MSTDC and it is throwing an exception:

System.Transactions.TransactionManagerCommunicationException:分布式事务管理器 (MSDTC) 的网络访问已被禁用.请启用 DTC使用组件服务管理工具在 MSDTC 的安全配置中进行网络访问 ---> System.Runtime.InteropServices.COMException (0x8004D024):事务管理器已禁用对远程/网络的支持交易.(来自 HRESULT 的异常:0x8004D024)在 System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32)propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier,指南&事务标识符,OletxTransactionIsolationLevel&隔离级别,ITransactionShim&transactionShim)....

System.Transactions.TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool ---> System.Runtime.InteropServices.COMException (0x8004D024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024) at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim)....

我按照 Kbalertz 指南在 PC 上启用 MSDTC已安装应用程序,但仍然出现错误.

I followed the Kbalertz guide to enable MSDTC on the PC on which the app is installed, but the error still occurs.

我想知道这是不是数据库问题?如果是这样,我该如何解决?

I was wondering if this was a database issue? If so, how can I resolve it?

推荐答案

将此用于 windows Server 2008 r2 和 Windows Server 2012 R2

Use this for windows Server 2008 r2 and Windows Server 2012 R2

  1. 点击开始,点击运行,输入dcomcnfg,然后点击确定打开>组件服务.

  1. Click Start, click Run, type dcomcnfg and then click OK to open Component Services.

在控制台树中,点击展开组件服务,点击展开计算机,点击展开我的电脑,点击展开分布式事务协调器,然后点击本地 DTC.

In the console tree, click to expand Component Services, click to expand Computers, click to expand My Computer, click to expand Distributed Transaction Coordinator and then click Local DTC.

右键单击本地 DTC,然后单击属性以显示本地 DTC 属性对话框.

Right click Local DTC and click Properties to display the Local DTC Properties dialog box.

点击安全标签.

勾选网络 DTC 访问"复选框.

最后勾选允许入站"允许出站"复选框.

点击应用确定.

将弹出关于重新启动服务的消息.

A message will pop up about restarting the service.

点击确定即可.

参考:https://msdn.microsoft.com/en-us/图书馆/dd327979.aspx

注意:有时本地计算机或服务器上的网络防火墙可能会中断您的连接,因此请确保您创建规则以允许入站""C:\Windows\System32\msdtc.exe

Note: Sometimes the network firewall on the Local Computer or the Server could interrupt your connection so make sure you create rules to "Allow Inbound" and "Allow Outbound" connection for C:\Windows\System32\msdtc.exe

这篇关于如何在 SQL Server 上启用 MSDTC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆