无法将项目添加到发布中

Microsoft.SQLServer.2008.ArticleCouldNotBeAddedToPublicationRule (Rule)

Knowledge Base article:

摘要

无法将项目添加到发布中。

原因

sp_addmergearticle 无法将项目添加至合并发布。

解决方法

检查事件日志和 SQL Server 错误日志中与此错误同时发生的其他错误。首先解决任何其他错误,因为此错误通常是其他错误的副作用。

对相关 SQL Server 实例运行 SQL Profiler,以捕获“错误和警告”事件。有时,这将捕获在其他情况下看不到的错误。

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

优先级

定义警报优先级。

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.ArticleCouldNotBeAddedToPublicationRule" 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>20009</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>2</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2008.ArticleCouldNotBeAddedToPublicationRule.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>