Monitors the Auto Close setting for the database on Windows. Note that this monitor is disabled by default. Use overrides to enable it when necessary.
This monitor checks the Auto Close database setting. Since this monitor is part of the overall standard requirements, an alert would be generated if the Auto Close setting does not meet the specified standard. Note that this monitor is disabled by default. Use overrides to enable it when necessary.
The AUTO_CLOSE option is useful for desktop databases because it allows managing database files as regular files. Such files can be moved and copied to make backups or even e-mailed to other users. When the database is set to 'AUTOCLOSE = ON', an operation that initiates an automatic database shutdown clears the plan cache for the instance of SQL Server. Clearing the plan cache causes a recompilation of all subsequent execution plans and can cause a sudden temporary decrease in query performance
Database mirroring requires the AUTO_CLOSE option to be set to OFF.
Autoclose only makes sense when you are sure the application usage pattern will keep the database closed for a relatively long period. Some single-user applications and multi-tenancy databases hosting situations may benefit from AUTO_CLOSE ON. For any other usage, it is generally not a good idea unless you really understand the application behavior and usage patterns
|
When the Auto Close setting is ON, the database is shut down cleanly and its resources are freed after the last user exits.
AUTO_CLOSE {ON | OFF}
A warning alert will be raised if the Auto Close option does not match the required setting. Out of the box, the monitor is configured to alert when this setting is set to 'ON'.
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)
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. | OFF |
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 query execution (seconds) | The workflow will fail and register an event, if the query execution takes longer than the specified period. | 60 |
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.SQLServer.Windows.Database | ||
Parent Monitor | Microsoft.SQLServer.Windows.Rollup.Database.AutomaticConfiguration | ||
Category | ConfigurationHealth | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.Windows.MonitorType.Database.DBConfigurationStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.Windows.Monitor.Database.AutoCloseConfiguration" Accessibility="Public" Enabled="false" Target="SqlDiscW!Microsoft.SQLServer.Windows.Database" ParentMonitorID="Microsoft.SQLServer.Windows.Rollup.Database.AutomaticConfiguration" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Windows.MonitorType.Database.DBConfigurationStatus" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Windows.Monitor.Database.AutoCloseConfiguration.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</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="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<DatabaseName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</DatabaseName>
<ConfigName>AutoClose</ConfigName>
<ExpectedValue>OFF</ExpectedValue>
<ConnectionString>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<MonitoringType>$Target/Host/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<SqlExecTimeoutSeconds>60</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>