订阅服务器代理正在重试

Microsoft.SQLServer.Replication.Windows.Monitor.SubscriberAgentIsRetryingMonitor (UnitMonitor)

订阅服务器代理(分发、日志读取器、合并、队列读取器和快照)正在重试监视器。请注意,任何版本的 SQL Server Express 均不支持 SQL Server 代理 Windows 服务。因此,此监视器不适用于 SQL Server Express 案例。

Knowledge Base article:

摘要

此监视器将检查订阅服务器代理(分发、合并、队列读取器和快照),并对代理的连续失败计数。如果计数超出了阈值,将创建包含失败作业列表的警报。请注意,任何版本的 SQL Server Express 均不支持 SQL Server 代理 Windows 服务。因此,此监视器不适用于 SQL Server Express 案例。

原因

失败可能是因为多个原因:

解决方法

打开复制监视器,或在代理历史记录表/代理作业历史记录中查看任何错误消息,并相应地调查/解决错误。

外部

启用 verbose 代理记录,并再次运行代理以获取详细信息

http://support.microsoft.com/kb/312292/

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

警告

已启用

启用或禁用工作流。

已失败作业计数阈值

已失败作业计数阈值

1

生成警报

定义工作流是否生成警报。

间隔(秒)

运行工作流的重复间隔时间(秒)。

300

每作业阈值

每作业阈值

3

同步时间

同步时间

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

200

数据库连接超时(秒)

如果在指定期间无法访问数据库,工作流将失败并注册一个事件。

15

Element properties:

TargetMicrosoft.SQLServer.Replication.Windows.Subscriber
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Replication.Windows.MonitorType.DistributorFailJobs
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL on Windows 复制: 订阅服务器代理正在重试。
订阅服务器(名称:“{0}”,服务器:“{1}”)已检测到 {2} 个已失败作业。这可能是因为订阅服务器代理正在重试。
{3}
RunAsMicrosoft.SQLServer.Core.RunAs.Monitoring

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Replication.Windows.Monitor.SubscriberAgentIsRetryingMonitor" Accessibility="Public" Enabled="true" Target="SQLReplWD!Microsoft.SQLServer.Replication.Windows.Subscriber" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorFailJobs" ConfirmDelivery="false" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Replication.Windows.Monitor.SubscriberAgentIsRetrying.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/ConnectionString$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='DistributorFailJobs']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='Message']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Health" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/MachineName$</MachineName>
<InstanceName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/InstanceName$</InstanceName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<ConnectionString>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/ConnectionString$</ConnectionString>
<MonitoringType>$Target/Host/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<ThresholdCountOfFailsForJob>3</ThresholdCountOfFailsForJob>
<ThresholdCountOfFailedJobs>1</ThresholdCountOfFailedJobs>
<CategoryList>Distribution, LogReader, Merge, QueueReader, Snapshot</CategoryList>
<ExcludeCategoryList/>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
</Configuration>
</UnitMonitor>