[弃用]索引 ID 所指示的非聚集索引有误

Microsoft.SQLServer.2008.The_nonclustered_index_indicated_by_the_index_ID_is_in_error_1_5_Rule (Rule)

Knowledge Base article:

摘要

当索引 ID 表示的非聚集索引出错时发生该错误。当进程试图删除不存在的行时检测到该损坏。

解决方法

执行不带修复子句的 DBCC CHECKDB 以确定损坏的程度。然后,执行带有 REPAIR_REBUILD 子句的 DBCC CHECKDB 以更正损坏。如果问题仍存在,则除去并重新创建该索引(如下所示),或与你的主要支持提供商联系。

重要提示: 如果执行带有 REPAIR_REBUILD 子句的 DBCC CHECKDB 未更正索引问题,或不确定带有 REPAIR_REBUILD 子句的 DBCC CHECKDB 对数据有何影响,则与你的主要支持提供商联系。

除去并重新创建索引:

记录错误文本中指定的索引页和索引 ID 的值。

确定哪个表和索引对应于该索引页号。

记下对象 ID。

如果有错的对象是系统表(对象 ID 小于 100),则无法除去该索引。执行带有 REPAIR_REBUILD 子句的 DBCC CHECKDB 或从已知的干净备份还原数据库。

如果对象 ID 大于 100,则使用第 1 步中获得的表名和索引名删除后再重新创建该索引。在大多数情况下,这将清除该错误。

在受影响的数据库上执行带有 REPAIR_REBUILD 子句的 DBCC CHECKDB,以验证已解决所有问题。

如果问题仍存在,则该过程可能不足以清除索引错误。在这种情况下,请与你的主要支持提供商联系。提供 DBCC CHECKDB 的输出以供查看。

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

优先级

定义警报优先级。

1

严重性

定义警报严重性。

2

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
索引 ID 所指示的非聚集索引有误
{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>