“查询调控器开销限制”选项的配置设置低于 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 选项增加到一个大于执行此查询的预计秒数的值。
名称 | 说明 | 默认值 |
已启用 | 启用或禁用工作流。 | 是 |
间隔(秒) | 运行工作流的重复间隔时间(秒)。 | 300 |
优先级 | 定义警报优先级。 | 1 |
严重性 | 定义警报严重性。 | 1 |
同步时间 | 同步时间 |
|
超时(秒) | 指定工作流在关闭之前允许运行的时间,并标记为失败。 | 200 |
数据库连接超时(秒) | 如果在指定期间无法访问数据库,工作流将失败并注册一个事件。 | 15 |
Target | Microsoft.SQLServer.Linux.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Comment | Mom2017ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';MOM2017GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74} |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ | DataSource | Microsoft.SQLServer.Linux.DataSource.EventCollectionFiltered | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.Linux.EventRule.DBEngine.The_query_has_been_canceled_because_the_estimated_cost_of_this_query_exceeds_the_configured_threshold._Contact_the_system_administrator_1_5_Rule" Target="SqlDiscL!Microsoft.SQLServer.Linux.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2017ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';MOM2017GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="_F6DA1507_12AF_11D3_AB21_00A0C98620CE_" Comment="{F6DA1507-12AF-11D3-AB21-00A0C98620CE}" TypeID="Microsoft.SQLServer.Linux.DataSource.EventCollectionFiltered">
<MachineName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<EventDisplayNumber>8649</EventDisplayNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.Linux.EventRule.DBEngine.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/Property[@Name='EventID']$. $Data/Property[@Name='Message']$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>