复制代理的每日总执行时间

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

其可监视分发服务器上复制代理、分发、日志读取器、合并、队列读取器和快照的每日总执行时间。

Knowledge Base article:

摘要

此警报将计算过去 24 小时(默认值)各复制代理的总运行时间,并检查任何代理的总运行时间是否超出了配置的阈值。

默认阈值将在 3 小时时生成警告,并在 4 小时时生成严重警告。

注意: 未监视连续作业。

原因

当复制了大量更改和命令时,可能会发生性能瓶颈。瓶颈的常见原因包括:

解决方法

确保订阅数据库上的索引未高度碎片化。

其他

有关对复制性能问题进行故障排除的更多信息,请参阅以下文章: http://technet.microsoft.com/library/ms152522.aspx

启用 verbose 日志记录,以获取有关特定复制代理的操作/错误的详细信息: http://support.microsoft.com/kb/312292

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

错误

已启用

启用或禁用工作流。

错误阈值

错误阈值

4

生成警报

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

间隔(秒)

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

300

度量期(小时)

度量所用的时间(小时)

24

同步时间

同步时间

 

超时(秒)

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

200

数据库连接超时(秒)

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

15

警告阈值

警告阈值

3

Element properties:

TargetMicrosoft.SQLServer.Replication.Windows.Distributor
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Replication.Windows.MonitorType.DistributorAgentsLoad
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL on Windows 复制: 复制代理超出了每日总执行时间阈值。
分发服务器(名称:“{0}”,服务器:“{1}”)过去 24 小时高利用率时间为 {2} 小时。
{3}
RunAsMicrosoft.SQLServer.Core.RunAs.Monitoring

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Replication.Windows.Monitor.ReplicationAgentsLoad" Accessibility="Public" Enabled="true" Target="SQLReplWD!Microsoft.SQLServer.Replication.Windows.Distributor" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorAgentsLoad" ConfirmDelivery="false" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Replication.Windows.Monitor.ReplicationAgentsLoad.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</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='LoadHours']$</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"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/NetbiosComputerName$</NetbiosComputerName>
<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>
<WarningThreshold>3</WarningThreshold>
<ErrorThreshold>4</ErrorThreshold>
<LastHours>24</LastHours>
<CategoryList>Distribution, LogReader, Merge, QueueReader, Snapshot</CategoryList>
<ExcludeCategoryList/>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
</Configuration>
</UnitMonitor>