索引識別碼指示的非叢集索引錯誤:已被取代

Microsoft.SQLServer.2008.The_nonclustered_index_indicated_by_the_index_ID_is_in_error_1_5_Rule (Rule)

Knowledge Base article:

摘要

當索引識別碼指示的非叢集索引有錯誤時,就會發生此錯誤。處理序嘗試刪除不存在的資料列時,偵測到損毀。

解決方式

執行不含修復子句的 DBCC CHECKDB,以決定損壞程度。然後,執行含有 REPAIR_REBUILD 子句的 DBCC CHECKDB 來修正損壞。如果問題仍然存在,請卸除並重新建立索引 (如下所示) 或連絡您的主要支援提供者。

重要:如果執行含有 REPAIR_REBUILD 子句的 DBCC CHECKDB 無法更正索引問題,或如果不確定含有 REPAIR_REBUILD 子句的 DBCC CHECKDB 會對資料產生何種影響,請連絡您的主要支援提供者。

若要卸除並重新建立索引,請:

記錄索引分頁的值與錯誤文字中指定的索引識別碼。

找出與索引頁碼對應的資料表與索引。

記下物件識別碼。

如果發生錯誤的物件是系統資料表 (物件識別碼小於 100),您將無法卸除索引。執行含有 REPAIR_REBUILD 子句的 DBCC CHECKDB,或從已知完好備份還原資料庫。

如果物件識別碼大於 100,請使用步驟 1 中包含的資料表名稱與索引名稱卸除並重新建立索引。在大多數情況下,這樣會清除錯誤。

在受影響的資料庫中執行含有 REPAIR_REBUILD 子句的 DBCC CHECKDB,以確認所有問題均已解決。

如果問題仍然存在,表示此程序可能無法完全清除索引錯誤。在此情況下,請連絡您的主要支援提供者。請備妥 DBCC CHECKDB 的輸出結果以供檢閱。

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
CategoryEventCollection
EnabledFalse
Event_ID644
Event Source$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
索引識別碼指示的非叢集索引錯誤
{0}
Event LogApplication
CommentMom2008ID='{C4E8CBD6-D28E-4F67-B4C3-5B543CE8CACF}';MOM2008GroupID={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.2008.The_nonclustered_index_indicated_by_the_index_ID_is_in_error_1_5_Rule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="false" ConfirmDelivery="true" Remotable="true" Comment="Mom2008ID='{C4E8CBD6-D28E-4F67-B4C3-5B543CE8CACF}';MOM2008GroupID={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>644</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.2008.The_nonclustered_index_indicated_by_the_index_ID_is_in_error_1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>