MSSQL 2014: 恢复数据库时出错。无法连接到 MSDTC 以检查事务的完成状态

Microsoft.SQLServer.2014.Error_recovering_database_._Could_not_connect_to_MSDTC_to_check_the_completion_status_of_transaction_1_5_Rule (Rule)

当您使用 MS DTC 跨多个服务器管理分布式事务且发生连接丢失时,分布式事务将被置为未知或“置疑”状态。中断的常见原因为:

Knowledge Base article:

摘要

当您使用 MS DTC 跨多个服务器管理分布式事务且发生连接丢失时,分布式事务将被置为未知或“置疑”状态。中断的常见原因为:

上停止其他涉及的服务。连接中断之后,MS DTC 使当时正在处理中的所有事务置为不一致状态。“置疑”事务导致这些症状是因为 SQL Server 无法确定要提交还是回滚事务,且 SQL Server 需要 MS DTC 告诉它如何处理。

解决方法

有多种不同的方法可以用于解决不一致的分布式事务: :

使用 MS DTC 管理控制台: :

.在“运行”对话框中键入“mmc.exe”(不带引号),以打开 Microsoft 管理控制台 (MMC)

.在 MMC 中的“控制台”菜单上,单击“添加/删除管理单元”

.在“添加/删除管理单元”对话框中,单击“添加”

.在“添加独立管理单元”对话框中,单击“组件服务”,然后单击“添加”以添加管理单元。

.单击“关闭”

.在“添加/删除管理单元”对话框中,单击“确定”

.在“组件服务”下的控制台根目录中,展开“组件服务”,依次指向“计算机”、“我的电脑”,然后单击“分布式事务处理协调器”

.选择“事务列表”。您将在详细信息窗格中看到事务。用鼠标右键单击事务,然后单击“解析”。您现在有三个选项:“提交”、“中止”或“略过”。从中选择适合您的情况的选项

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

优先级

定义警报优先级。

1

严重性

定义警报严重性。

1

Element properties:

TargetMicrosoft.SQLServer.2014.DBEngine
CategoryEventCollection
EnabledTrue
Event_ID3437
Event Source$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
MSSQL 2014: 恢复数据库时出错。无法连接到 MSDTC 以检查事务的完成状态
{0}
Event LogApplication
CommentMom2014ID='{6B1C776D-E075-4F73-B9C0-66CEF9024905}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

ID Module Type TypeId RunAs 
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ DataSource Microsoft.Windows.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2014.Error_recovering_database_._Could_not_connect_to_MSDTC_to_check_the_completion_status_of_transaction_1_5_Rule" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2014ID='{6B1C776D-E075-4F73-B9C0-66CEF9024905}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="_F6DA1507_12AF_11D3_AB21_00A0C98620CE_" Comment="{F6DA1507-12AF-11D3-AB21-00A0C98620CE}" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>3437</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2014.Error_recovering_database_._Could_not_connect_to_MSDTC_to_check_the_completion_status_of_transaction_1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>