“查询调控器开销限制”选项的配置设置低于 SQL Server 优化程序为指定查询预计的开销。默认情况下,“查询调控器开销限制”选项设置为 0,即允许运行所有查询。但是,通过将该选项设置为大于 0 的数,可以指定此 SQL Server 实例的上限。预计开销大于此值的查询计划不会启动。
“查询调控器开销限制”选项的配置设置低于 SQL Server 优化程序为指定查询预计的开销。默认情况下,“查询调控器开销限制”选项设置为 0,即允许运行所有查询。但是,通过将该选项设置为大于 0 的数,可以指定此 SQL Server 实例的上限。预计开销大于此值的查询计划不会启动。
有关详细信息,请参阅联机丛书中的“query governor cost limit 选项”、“如何设置 query governor cost limit 选项(企业管理器)”和“查询优化建议”。
采取以下任何一种措施均可防止此查询出现此消息:
优化查询,以将预计执行时间降低到限制值以下。
验证查询引用的表和索引上的统计是否是最新的。您可能需要执行 UPDATE STATISTICS 或 DBCC DBREINDEX。
将 query governor cost limit 选项重新设置为默认值 0。这将允许所有查询运行。
将 query governor cost limit 选项增加到一个大于执行此查询的预计秒数的值。
名称 | 说明 | 默认值 |
已启用 | 启用或禁用工作流。 | 是 |
优先级 | 定义警报优先级。 | 1 |
严重性 | 定义警报严重性。 | 1 |
Target | Microsoft.SQLServer.2014.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 8649 | ||
Event Source | $Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$ | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Application | ||
Comment | Mom2014ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74} |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ | DataSource | Microsoft.Windows.EventProvider | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2014.The_query_has_been_canceled_because_the_estimated_cost_of_this_query_exceeds_the_configured_threshold._Contact_the_system_administrator_1_5_Rule" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2014ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';MOM2014GroupID={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">
<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="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>8649</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2014.The_query_has_been_canceled_because_the_estimated_cost_of_this_query_exceeds_the_configured_threshold._Contact_the_system_administrator_1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>