已達到連線數的上限

Microsoft.SQLServer.2012.Maximum_limit_for_connections_has_been_reached_1_5_Rule (Rule)

Knowledge Base article:

摘要

SQL Server 預設會動態管理使用者連線所需的記憶體。但將 [使用者連線] 組態選項設定為 0 以外的值,可以將連線數上限設為固定的值。不建議將使用者連線選項設定為非零的值。如果此選項設定為非零的值,然後超過了指定的連線數時,所有其他的登入嘗試都將會失敗,且會出現上述訊息。如果該值設定為 1,則 SQL Server 執行個體可能無法啟動。

解決方式

如果 SQL Server 正在執行中,且已有系統管理員連線到它,請發出下列命令,將使用者連線選項重設為預設值 0 (動態):

sp_configure 'user connections', 0

執行

reconfigure with override

必須重新啟動 SQL Server 執行個體,變更才能生效。

如果 SQL Server 無法啟動,或您無法使用其中一個現有連線,則需要以最基本的組態啟動 SQL Server 執行個體,並將使用者連線選項重設為預設值 0 (動態)。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

優先順序

定義警示優先順序。

1

嚴重性

定義警示嚴重性。

1

Element properties:

TargetMicrosoft.SQLServer.2012.DBEngine
CategoryEventCollection
EnabledTrue
Event_ID17809
Event Source$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
已達到連線數的上限
{0}
Event LogApplication
CommentMom2012ID='{A9344B04-ED2A-4F54-B91D-CC99D35469F1}';MOM2012GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2012.Maximum_limit_for_connections_has_been_reached_1_5_Rule" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2012ID='{A9344B04-ED2A-4F54-B91D-CC99D35469F1}';MOM2012GroupID={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" RunAs="SQL!Microsoft.SQLServer.SQLDefaultAccount">
<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="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>17809</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="SystemHealth!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.2012.Maximum_limit_for_connections_has_been_reached_1_5_Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>Event ID: $Data/EventDisplayNumber$. $Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue/>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>