SQL Server Windows 服務

Microsoft.SQLServer.2008.DBEngine.ServiceMonitor (UnitMonitor)

此監視器會檢查 SQL 資料庫引擎服務的狀態。

Knowledge Base article:

摘要

此監視器會檢查 SQL Database Engine Windows 服務的狀態。

原因

此監視的「不在執行中」狀態表示 SQL 資料庫引擎服務設定為自動啟動,但是在特定期間處於「已停止」狀態。這段期間定義在「無法使用的時間」監視屬性中,而且可加以覆寫。依預設,此值為 900 秒 (15 分鐘)。如果 SQL 資料庫引擎回到「執行中」狀態的速度大於這個時間,這表示剛剛才重設它。

如果這個監視於特定的環境中太吵雜,請提高「無法使用的時間」。反之,如果過於隱性,請減少「無法使用的時間」值。

一般來說,Windows 服務可能會因為許多原因而停止,其中包括:

解決方式

您可以使用下列連結嘗試重新啟動服務:

啟動 SQL 資料庫引擎服務

您可以使用下列連結,檢視可能與這個問題相關的此 SQL Server™ 執行個體的其他警示:

檢視 SQL Server 警示

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.CheckWinServiceStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
SQL Server 服務已停止
電腦 {0} 上的資料庫引擎執行個體 {1} 的 Windows 服務已停止
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.DBEngine.ServiceMonitor" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.CheckWinServiceStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.DBEngine.ServiceMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
</OperationalStates>
<Configuration>
<Frequency>60</Frequency>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</ServiceName>
<CheckStartupType>true</CheckStartupType>
<UnavailableTime>900</UnavailableTime>
</Configuration>
</UnitMonitor>