无法清除分发历史记录表

Microsoft.SQLServer.2008.CouldNotCleanUpDistributionHistoryTablesRule (Rule)

Knowledge Base article:

摘要

分发历史记录清除进程无法从一个或多个历史记录表中删除过期的行。

原因

历史记录表的数据包括 msdbsysreplicationalerts,并且分发数据库表 MSsnapshot_historyMSlogreader_historyMSdistribution_historyMSqreader_historyMSmerge_historyMSrepl_errors 不能删除。

解决方法

检查作业历史记录或其他日志中与此错误出现的时间大致相同的其他消息。请先诊断那些消息。

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

优先级

定义警报优先级。

2

严重性

定义警报严重性。

2

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityHigh
RemotableTrue
Alert Message
无法清除分发历史记录表
{0}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2008.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2008.CouldNotCleanUpDistributionHistoryTablesRule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="true" ConfirmDelivery="true">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<PublisherName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</PublisherName>
<EventNumber>20553</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.CouldNotCleanUpDistributionHistoryTablesRule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>