Linux 上的 MSSQL: 代理程式可疑。最後幾分鐘無回應

Microsoft.SQLServer.Linux.CollectionRule.Agent.The_agent_is_suspect._No_response_within_last_minutes_1_5_Rule (Rule)

當 SQL Server Enterprise Manager 輪詢複寫代理程式時,如果複寫代理程式太忙而無法回應;因而 SQL Server Enterprise Manager 不清楚複寫代理程式的狀態,也無法報告複寫代理程式是否正常運作,則會發生此問題。

Knowledge Base article:

摘要

當 SQL Server Enterprise Manager 輪詢複寫代理程式時,如果複寫代理程式太忙而無法回應;因而 SQL Server Enterprise Manager 不清楚複寫代理程式的狀態,也無法報告複寫代理程式是否正常運作,則會發生此問題。

若複寫代理程式失敗,您會收到下列錯誤訊息:

訊息 20536 嚴重性 10「複寫: 代理程式失敗。」

導致複寫代理程式忙碌的原因有很多:可能是正在複寫的資料太多,或者是設定或複寫設計問題導致處理序長時間執行。

解決方式

若要降低訊息出現的頻率,請提高非使用狀態閾值。

變更此值不能解決任何問題,只是變更了輪詢複寫代理程式目前狀態的頻率。若要變更無活動臨界值:

除非您收到顯示複寫代理程式發生問題的其他錯誤訊息,否則「代理程式可疑」訊息僅為參考用訊息。收到此訊息時,如果沒有發生其他相關錯誤,無需停止複寫代理程式。如果停止複寫代理程式,則會復原其使用的處理序,然後您必須重新啟動處理序;不然請等待處理序完成。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

間隔 (秒)

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

300

優先順序

定義警示優先順序。

1

Severity

Defines Alert Severity.

2

Synchronization Time

Synchronization Time

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

200

Timeout for database connection (seconds)

The workflow will fail and register an event, if it cannot access the database during the specified period.

15

Element properties:

TargetMicrosoft.SQLServer.Linux.DBEngine
CategoryEventCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
RemotableTrue
Alert Message
Linux 上的 MSSQL: 代理程式可疑。最後幾分鐘無回應
{0}
CommentMom2017ID='{C65DF52B-B877-48C3-B546-67D69C494E84}';MOM2017GroupID={467ECC75-C5DA-42BD-955C-A73BBB51AF74}

Member Modules:

ID Module Type TypeId RunAs 
_F6DA1507_12AF_11D3_AB21_00A0C98620CE_ DataSource Microsoft.SQLServer.Linux.DataSource.EventCollectionFilteredAgent Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SQLServer.Linux.CollectionRule.Agent.The_agent_is_suspect._No_response_within_last_minutes_1_5_Rule" Target="SqlDiscL!Microsoft.SQLServer.Linux.DBEngine" Enabled="true" ConfirmDelivery="true" Remotable="true" Comment="Mom2017ID='{C65DF52B-B877-48C3-B546-67D69C494E84}';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.Linux.DataSource.EventCollectionFilteredAgent">
<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>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>200</TimeoutSeconds>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<EventDisplayNumber>20554</EventDisplayNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SQLServer.Linux.CollectionRule.Agent.The_agent_is_suspect._No_response_within_last_minutes_1_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>