sql-server - 如何在 SQL Server 上启用 MSDTC?

标签 sql-server msdtc

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

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)....

我关注了the Kbalertz guide to enable MSDTC在安装了该应用程序的电脑上,但仍然出现该错误。

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

最佳答案

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

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

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

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

  4. 点击安全选项卡。

  5. 选中“网络 DTC 访问”复选框。

  6. 最后选中“允许入站”“允许出站”复选框。

  7. 点击应用确定

  8. 将会弹出一条关于重新启动服务的消息。

  9. 点击确定即可。

引用:https://msdn.microsoft.com/en-us/library/dd327979.aspx

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

的出站” 连接

关于sql-server - 如何在 SQL Server 上启用 MSDTC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7694/

相关文章:

sql - Rollback 和 RaiseError,哪个先?

.net - Linux 的事务范围

nhibernate - NServiceBus和NHibernate-消息处理程序和事务

sql-server-2012 - SQL Server 和 Websphere MQ 的分布式事务

sql-server - 使用 SQL Server 进行基于 PKI 的 x.509 证书身份验证?

sql-server - Entity Framework 高效查询

amazon-ec2 - 我“真的”需要 RPC 和 NETBIOS 才能在本地服务器和 Amazon EC2 之间使用事务性 NServiceBus 队列吗?

transactionscope - MSDTC 只在一个方向上工作

java - 在Idea J中添加新的数据源

sql - 对 null 的算术运算