SQL Server Agent 服務會在自動重新啟動 SQL Server 時,回報此錯誤。SQL Server Agent 只有在下列情況時,才會自動重新啟動 SQL Server: SQL Server 因使用者或應用程式發出明確停止命令以外的某些原因而停止,以及在 SQL Server Agent [進階] 屬性中選取 [如果 SQL Server 非預期地停止,則自動予以重新啟動] 選項。在重新啟動 SQL Server 期間,SQL Server Agent 會將這則訊息寫入裝載 SQL Server 電腦上的應用程式事件記錄檔。
錯誤是由 SQL Server Agent 服務在自動重新啟動 SQL Server 時回報。SQL Server Agent 將只會在 SQL Server 因為不是來自使用者或應用程式的明確停止命令而停止,並且在 SQL Server Agent 進階屬性中選取了如果 SQL Server 非預期地停止,則自動予以重新啟動選項時自動重新啟動。在重新啟動 SQL Server 時,SQL Server Agent 會將此訊息寫入裝載 SQL Server 的電腦上的應用程式事件。
SQL Server 可能因為數種不同原因而意外停止。原因包括:
來自 SQL Server 記憶體空間內程序的記憶體流失,例如來自擴充的預存程序或來自 OLE Automation。
請從像是工作管理員的 [程序] 索引標籤,或是使用像是 Windows Resource Kit 的 kill.exe 這類程式,直接結束 sqlservr.exe 程序。
某些類型的未處理存取違規。
如果您不想讓 SQL Server Agent 自動重新啟動 SQL Server,請關閉此選項。這個程序在《線上叢書》的<SQL Server Agent 屬性 ([進階] 索引標籤)>中有所說明。
如果反覆發生此問題,將需要判斷 SQL Server 服務意外停止的原因:
請查看 SQL Server 錯誤記錄檔和事件檢視器記錄,是否有任何相關錯誤有助於解釋服務意外停止的原因。
使用效能監視器來監視系統狀態,並在服務終止的時間附近尋找問題。
名稱 | 描述 | 預設值 |
已啟用 | 啟用或停用該工作流程。 | 是 |
優先順序 | 定義警示優先順序。 | 1 |
嚴重性 | 定義警示嚴重性。 | 2 |
Target | Microsoft.SQLServer.2014.DBEngine | ||
Category | EventCollection | ||
Enabled | True | ||
Event_ID | 14265 | ||
Event Source | $Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$ | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Remotable | True | ||
Alert Message |
| ||
Event Log | Application | ||
Comment | Mom2014ID='{D9D2C13A-3AAA-410C-B594-EC4ED1A7FC75}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74} |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ | DataSource | Microsoft.Windows.EventProvider | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="Microsoft.SQLServer.2014.The_MSSQLServer_service_terminated_unexpectedly_3_5_Rule" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2014ID='{D9D2C13A-3AAA-410C-B594-EC4ED1A7FC75}';MOM2014GroupID={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">
<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="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>14265</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2014.The_MSSQLServer_service_terminated_unexpectedly_3_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>