監視 Linux 上資料庫的 [自動關閉] 設定。注意: 根據預設會停用此監視器。如有需要,請使用覆寫加以啟用。
此監視器會檢查此資料庫的 [自動關閉] 設定。因為此監視器是整體標準需求的一部分,所以若設定不符合指定的標準,就會產生警示。
對於桌面資料庫而言,AUTO_CLOSE 選項非常有用,因為它可讓您將資料庫檔案當做一般檔案來管理。您可以移動它們、複製它們來建立備份,甚至可以用電子郵件將它們傳給其他使用者。然而,當資料庫設為 AUTOCLOSE = ON 時,起始自動資料庫關閉的作業會清除 SQL Server 執行個體的計畫快取。清除計畫快取會導致重新編譯所有後續執行計畫,而且可能會造成查詢效能突然暫時下降。
資料庫鏡像需要 AUTO_CLOSE OFF。
只有當您確定應用程式使用模式將使資料庫保持關閉相當長一段時間時,自動關閉才有意義。某些單一使用者應用程式與多重租用戶資料庫的裝載狀況,可能非常適用於 AUTO_CLOSE ON。對於其他所有使用方式,則除非您真的了解應用程式行為以及使用模式,否則通常不適用
|
當 [自動關閉] 設定為 ON 時,資料庫會在最後一個使用者結束之後完全關機並釋放其資源。
AUTO_CLOSE {ON | OFF}
若 [自動關閉] 選項與必要設定不符,將會引發警告警示。根據預設,此監視器設定為當此設定設為 “ON” 時,要產生警示。
請按照下列方式解決此問題:
請變更此資料庫的組態設定,使其符合預期的值。
覆寫此特定資料庫或所有資料庫的此單元監視器預期值。
若此監視器與此資料庫無關:
為此特定資料庫或所有資料庫使用覆寫來停用此監視器。
為此特定資料庫或所有資料庫使用複寫,來停用最上層彙總組態監視器。
名稱 | 描述 | 預設值 |
警示優先順序 | 定義警示優先順序。 | 標準 |
警示嚴重性 | 定義警示嚴重性。 | 警告 |
已啟用 | 啟用或停用該工作流程。 | 否 |
預期值 | 資料庫組態設定需要的值。若要檢視一組適用的值,請參閱此監視的知識庫之<組態>一節。 | 關閉 |
產生警示 | 定義工作流程是否要產生警示。 | 是 |
間隔 (秒) | 每次重複執行工作流程之間的時間間隔 (秒)。 | 43200 |
同步處理時間 | 同步處理時間使用 24 小時制。可予省略。 |
|
逾時 (秒) | 指定流程被關閉及標示為失敗之前,允許執行的時間。 | 300 |
資料庫連線的逾時 (秒) | 若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。 | 15 |
Target | Microsoft.SQLServer.Linux.Database | ||
Parent Monitor | Microsoft.SQLServer.Linux.Rollup.Database.AutomaticConfiguration | ||
Category | ConfigurationHealth | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.Linux.MonitorType.Database.DBConfigurationStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.Linux.Monitor.Database.AutoCloseConfiguration" Accessibility="Public" Enabled="false" Target="SqlDiscL!Microsoft.SQLServer.Linux.Database" ParentMonitorID="Microsoft.SQLServer.Linux.Rollup.Database.AutomaticConfiguration" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Linux.MonitorType.Database.DBConfigurationStatus" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Linux.Monitor.Database.AutoCloseConfiguration.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.Database"]/DatabaseName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.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="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>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>