Monitors the Auto Create Statistic setting for the database. Note: This monitor is disabled by default. Please use overrides to enable it when necessary.
This monitor checks the Auto Create Statistics setting for this database. Since this monitor is a part of an overall standards requirement, an alert would be generated if the setting does not meet the specified standard.
The query optimizer needs up-to-date and accurate statistics in order to generate good plans. In most cases, it’s best to let Managed Instance maintain the statistics. If you turn “Auto Create Stats” and “Auto Update Stats”, then it is up to you to keep the statistics up-to-date. Failure to do so will lead to poor query performance. Most applications should have these options ON.
When the Auto Create statistics setting is ON, the query optimizer creates statistics on one or more columns of a table of indexed view, as necessary, to improve query plans and query performance.
AUTO_CREATE_STATISTICS {ON | OFF}
A warning alert will be raised if the option does not match the required setting. Out of the box, the monitor is configured to alert when this setting is set to “OFF”.
This issue may be resolved by:
Changing the configuration setting for this database to match the expected value.
Overriding the expected value for this unit monitor for this specific database or all databases.
Alternatively, if this monitor is not of concern for this database:
Disabling the monitor using overrides for this specific database or all databases.
Disabling the top-level aggregate configuration monitor using overrides for this specific database or all databases.
See the detailed information about this setting: ALTER DATABASE SET Options (Transact-SQL)
See also Using Statistics to Improve Query Performance article.
Name | Description | Default Value |
Alert Priority | Defines Alert Priority. | Normal |
Alert Severity | Defines Alert Severity. | Warning |
Enabled | Enables or disables the workflow. | No |
Expected Value | Expected value of database configuration setting. To view the set of applicable values please refer to "Configuration" section of the knowledge base article of this monitor. | ON |
Generates Alerts | Defines whether the workflow generates an Alert. | Yes |
Interval (seconds) | The recurring interval of time in seconds in which to run the workflow. | 43200 |
Synchronization Time | The synchronization time specified by using a 24-hour format. May be omitted. |
|
Timeout (seconds) | Specifies the time the workflow is allowed to run before being closed and marked as failed. | 300 |
Timeout for database connection (seconds) | The workflow will fail and register an event, if it cannot access the database during the specified period. | 15 |
Target | Microsoft.Azure.ManagedInstance.Database | ||
Parent Monitor | Microsoft.Azure.ManagedInstance.Rollup.Database.AutomaticConfiguration | ||
Category | ConfigurationHealth | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Azure.ManagedInstance.MonitorType.Database.DBConfigurationStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Azure.ManagedInstance.Monitor.Database.AutoCreateStatConfiguration" Accessibility="Public" Enabled="false" Target="MngdInstD!Microsoft.Azure.ManagedInstance.Database" ParentMonitorID="Microsoft.Azure.ManagedInstance.Rollup.Database.AutomaticConfiguration" Remotable="true" Priority="Normal" TypeID="Microsoft.Azure.ManagedInstance.MonitorType.Database.DBConfigurationStatus" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.Azure.ManagedInstance.Monitor.Database.AutoCreateStatConfiguration.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.Database"]/DatabaseName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/MachineName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ConfigurationValueOK" MonitorTypeStateID="ConfigurationValueOK" HealthState="Success"/>
<OperationalState ID="ConfigurationValueNotOK" MonitorTypeStateID="ConfigurationValueNotOK" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/MachineName$</MachineName>
<InstanceName>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/InstanceName$</InstanceName>
<DatabaseName>$Target/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.Database"]/DatabaseName$</DatabaseName>
<ConfigName>AutoCreateStat</ConfigName>
<ExpectedValue>ON</ExpectedValue>
<ConnectionString>$Target/Host/Property[Type="MngdInstLib!Microsoft.Azure.ManagedInstance.Library.DBEngine"]/ConnectionString$</ConnectionString>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>