無法對資料表新增資料行

Microsoft.SQLServer.2012.Failed_to_add_column__to_table__1_5_Rule (Rule)

Knowledge Base article:

摘要

<S sp_repladdcolumn G> 無法將指定的資料行加入發行集資料庫的資料表中。如果除了此錯誤之外還回報了另一個錯誤,則另一個錯誤應會指出無法加入資料行的原因。如果未回報任何其他錯誤,則該問題可能是擁有者指定的資料表不存在,或資料類型不是可加入複寫資料表的資料類型。新資料行的資料類型必須是識別、經過計算或時間戳記資料行; 可以是 Null 或是具有預設值。如需回報其他錯誤的某一原因之詳細資訊,請參閱 Microsoft 知識庫文章 827960。如需 sp_repladdcolumn 的詳細資訊,請參閱線上叢書中的<發行集資料庫上的結構描述變更>。

解決方式

如果此錯誤伴隨其他錯誤發生,請先對其他錯誤進行疑難排解。如果沒有發生其他錯誤,請確認指定資料表存在,並且資料表擁有者有效且已對應至有效登入。確認指定的資料類型有效。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

優先順序

定義警示優先順序。

1

嚴重性

定義警示嚴重性。

2

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
CategoryEventCollection
EnabledTrue
Event_ID21285
Event Source$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
無法對資料表新增資料行
{0}
Event LogApplication
CommentMom2012ID='{F3CE64AC-AA75-4E3F-BD6F-FBD7D4FC139F}';MOM2012GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2012.Failed_to_add_column__to_table__1_5_Rule" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2012ID='{F3CE64AC-AA75-4E3F-BD6F-FBD7D4FC139F}';MOM2012GroupID={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" RunAs="SQL!Microsoft.SQLServer.SQLDefaultAccount">
<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="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>21285</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2012.Failed_to_add_column__to_table__1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>