Distribution Agents state (aggregated for all Publications)

Microsoft.SQLServer.2012.Replication.Monitor.DistributionAgentState (UnitMonitor)

This monitor checks the state of the Distribution agents for all publications serviced by this Distributor.

Knowledge Base article:

Summary

One or more of the Distribution agents failed.

Causes

Some of the reasons that can explain failures of Distribution agents are:

Resolutions

Use any of the following workarounds from this KB to resolve the issue.

Use the workaround from this KB to resolve the issue.

Use a UNC path to store the snapshot folder. Share the folder and grant read permissions to the Distribution agent account.

Follow http://msdn.microsoft.com/library/ms143504.aspx and make sure SQL Agent Service SID has the following rights:

Check parameters passed to the Distribution agent command line.

External

http://technet.microsoft.com/library/ms147328.aspx

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow

Yes

Generates Alerts

Defines whether the workflow generates an Alert

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

300

Show Jobs With Unknown State

Include jobs with unknown state to the monitor output and alert context. Will affect health

No

Timeout (seconds)

Timeout (seconds)

300

Synchronization Time

Synchronization Time

 

Element properties:

TargetMicrosoft.SQLServer.2012.Replication.Distributor
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.Replication.MonitorType.ReplicationAgentState
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL2012 Replication: Distribution Agent has errors.
{0}
RunAsMicrosoft.SQLServer.Replication.Monitoring.RunAs.Monitor

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Replication.Monitor.DistributionAgentState" Accessibility="Public" Enabled="true" Target="MS2RD!Microsoft.SQLServer.2012.Replication.Distributor" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.Replication.MonitorType.ReplicationAgentState" ConfirmDelivery="false" RunAs="MSRL!Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Replication.Monitor.DistributionAgentState.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='Message']$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Health" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<SqlTimeout>300</SqlTimeout>
<ConnectionString>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/ConnectionString$</ConnectionString>
<XPathName>Distribution$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/ConnectionString$</XPathName>
<ShowJobsWithUnknownState>false</ShowJobsWithUnknownState>
<EstimatedJobDuration>15</EstimatedJobDuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>