無法清除散發記錄資料表

Microsoft.SQLServer.2008.CouldNotCleanUpDistributionHistoryTablesRule (Rule)

Knowledge Base article:

摘要

散發歷程清除程序無法從一個或多個歷程資料表中刪除過期的資料列。

原因

歷程記錄資料表的資料包括 msdb 資料表 sysreplicationalerts,且無法移除散發資料庫資料表 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>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
<SuppressionValue>$Data/PublisherName$</SuppressionValue>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>