L'impostazione di configurazione dell'opzione query governor cost limit è inferiore al costo stimato dall'utilità di ottimizzazione di SQL Server per la query specificata. Per impostazione predefinita, l'opzione query governor cost limit è impostata su 0, in modo da consentire l'esecuzione di tutte le query. In questa istanza di SQL Server è stato tuttavia specificato un limite superiore impostando l'opzione su un numero maggiore di 0. I piani di query con un costo anticipato superiore a questo valore non vengono avviati.
Per ulteriori informazioni, vedere gli argomenti "Opzione query governor cost limit", "Come impostare l'opzione relativa al limite di costo di Query Governor (Enterprise Manager)" e "Consigli per l'ottimizzazione delle query" nella documentazione online.
Per impedire che il messaggio venga visualizzato per la query corrente, effettuare una delle operazioni seguenti:
Ottimizzare la query in modo da ridurre il tempo di esecuzione stimato fino a un valore inferiore al valore limite.
Verificare che le statistiche sulle tabelle e gli indici a cui fa riferimento la query siano aggiornate. Potrebbe essere necessario eseguire UPDATE STATISTICS o DBCC DBREINDEX.
Impostare l'opzione query governor cost limit sul valore predefinito 0 per consentire l'esecuzione di tutte le query.
Impostare l'opzione query governor cost limit su un valore superiore al numero di secondi stimato per l'esecuzione della query.
Target | Microsoft.SQLServer.2008.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 8649 | ||
Event Source | $Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$ | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Application | ||
Comment | Mom2008ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';MOM2008GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74} |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ | DataSource | Microsoft.Windows.EventProvider | Microsoft.SQLServer.SQLDefaultAccount |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2008.The_query_has_been_canceled_because_the_estimated_cost_of_this_query_exceeds_the_configured_threshold._Contact_the_system_administrator_1_5_Rule" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2008ID='{74138FB8-4CBA-480B-82D1-C5456A38AA4A}';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>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.2008.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>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>