Windows 上的 MSSQL: 無法為 Common Language Runtime (CLR) 配置記憶體

Microsoft.SQLServer.Windows.EventRule.DBEngine.Failed_to_allocate_memory_for_Common_Language_Runtime__CLR__5_Rule (Rule)

SQL Server 無法配置 CLR 的記憶體時,此規則會觸發警示。

Knowledge Base article:

摘要

當 SQL Server 正在啟動時,可能會發生此錯誤。SQL Server 在啟動順序過程中需要數 KB 的記憶體來執行 Common Language Runtime。若無法獲得此記憶體量,SQL Server 可能無法啟動。

原因

當記憶體不足以執行 CLR 時會發生此錯誤。

解決方式

請先嘗試重新啟動伺服器。如果無法啟動 SQL Server,請查看 Windows 系統及應用程式記錄檔,以找出與系統多載或記憶體壓力相關的錯誤。請確認沒有硬體問題。請加大可用記憶體數量。重新啟動電腦,並嘗試再次啟動 SQL Server。如果持續發生問題,請連絡產品廠商。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

間隔 (秒)

每次重複執行工作流程之間的時間間隔 (秒)。

300

優先順序

定義警示優先順序。

1

嚴重性

定義警示嚴重性。

2

同步處理時間

同步處理時間

 

逾時 (秒)

指定流程被關閉及標示為失敗之前,允許執行的時間。

200

資料庫連線的逾時 (秒)

若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。

15

Element properties:

TargetMicrosoft.SQLServer.Windows.DBEngine
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Windows 上的 MSSQL: 無法為 Common Language Runtime (CLR) 配置記憶體
{0}
CommentMom2017ID='{60AA6DE5-6CAA-4E24-B038-972C9ED6AC6A}';MOM2017GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

ID Module Type TypeId RunAs 
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ DataSource Microsoft.SQLServer.Windows.DataSource.EventCollectionFiltered Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.Windows.EventRule.DBEngine.Failed_to_allocate_memory_for_Common_Language_Runtime__CLR__5_Rule" Target="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2017ID='{60AA6DE5-6CAA-4E24-B038-972C9ED6AC6A}';MOM2017GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="_F6DA1507_12AF_11D3_AB21_00A0C98620CE_" Comment="{F6DA1507-12AF-11D3-AB21-00A0C98620CE}" TypeID="Microsoft.SQLServer.Windows.DataSource.EventCollectionFiltered">
<MachineName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<MonitoringType>$Target/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<SqlExecTimeoutSeconds>60</SqlExecTimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<EventDisplayNumber>6289</EventDisplayNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.Windows.EventRule.DBEngine.Failed_to_allocate_memory_for_Common_Language_Runtime__CLR__5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
<AlertParameter3>Event ID: $Data/Property[@Name='EventID']$. $Data/Property[@Name='Message']$</AlertParameter3>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>