MSSQL 2014: SQL Server 内存不足

Microsoft.SQLServer.2014.EventCollectionRule.DBEngine.SQLServerOutOfMemory (Rule)

SQL Server 无法分配足够的内存量来运行查询。

Knowledge Base article:

摘要

SQL Server 无法分配足够的内存量来运行查询。

原因

问题可能会因各种原因导致,包括操作系统设置、物理内存可用性或针对当前工作负荷的内存限制。在大多数情况下,事务失败不是导致此错误的原因。诊断查询(如 DBCC 语句)可能会失败,因为服务器的内存不足

与 SQL Server 相比,SQL Server 内存优化数据使用的内存更多,方式也不一样。为内存优化数据安装和分配的内存量可能无法满足日益增长的需要。如果是这样,内存可能会用尽。

解决方法

有关可帮助您避免很多 OOM 情况的指南,请参阅“监视器和故障排除内存使用率”主题。

外部

有关此问题的详细信息,请参阅: 解决内存不足(OOM)问题

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

优先级

定义警报优先级。

1

严重性

定义警报严重性。

2

Element properties:

TargetMicrosoft.SQLServer.2014.DBEngine
CategoryEventCollection
EnabledTrue
Event_ID701
Event Source$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
MSSQL 2014: SQL Server 无法分配足够的内存来运行查询
{0}
Event LogApplication
CommentMom2014ID='{2531CFA5-7EF0-4B45-AAA1-DAE73294DFF6}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.2014.EventCollectionRule.DBEngine.SQLServerOutOfMemory" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2014ID='{2531CFA5-7EF0-4B45-AAA1-DAE73294DFF6}';MOM2014GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}">
<Category>EventCollection</Category>
<DataSources>
<DataSource ID="DS" 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>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>701</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<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>
</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.EventCollectionRule.DBEngine.SQLServerOutOfMemory.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>