当提交内部 MSDTC 事务失败时,规则将触发错误
Microsoft 分布式事务处理协调器(MS DTC)可以要求事务参与者(如 COM+ 组件或者一个或多个 SQL Server 实例) PREPARE 为两阶段提交(2PC)协议的一部分。如果 SQL Server 响应它已为 COMMIT 做好了准备,但 MS DTC 由于任何原因要求 ABORT,则发出 COMMIT 的服务器上会出现此错误。类似地,如果 SQL Server 启动了事务请求并要求另一个参与者 PREPARE 时,但在此期间有任何参与者请求了 ABORT,则启动该请求的服务器将报告此错误。
此消息表示两阶段提交活动正常。如果您不能确定哪个应用程序或 SQL Server 查询正在调用 MS DTC,您可以使用 SQL Profiler 跟踪来确定终止了哪个命令。
可能请求 ABORT 的原因示例包括: :
根据应用程序的超时设置,该事务已超时。
参与该事务的另一个资源管理器可能已申请 ABORT。
在事务处理期间,MS DTC 可能已关闭。
作为消息的一部分返回的具体结果代码可能变化,搜索结果代码可能提供有关根本原因的详细信息。
有关 MS DTC 的详细信息,请参阅联机丛书中的“MS DTC 服务”、“分布式事务”、“分布式事务体系结构”、“配置链接服务器”和“即时更新工作方式”。
名称 | 说明 | 默认值 |
已启用 | 启用或禁用工作流。 | 是 |
优先级 | 定义警报优先级。 | 1 |
严重性 | 定义警报严重性。 | 1 |
Target | Microsoft.SQLServer.2014.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 8520 | ||
Event Source | $Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$ | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Application | ||
Comment | Mom2014ID='{A7060C45-95ED-4D39-9E2B-1DC2866C0AC4}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74} |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ | DataSource | Microsoft.Windows.EventProvider | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2014.Commit_of_internal_MSDTC_transaction_failed_1_5_Rule" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2014ID='{A7060C45-95ED-4D39-9E2B-1DC2866C0AC4}';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>8520</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.Commit_of_internal_MSDTC_transaction_failed_1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>