This monitor checks the state of the Merge agents for all Subscriptions on the Distributor.
The Replication Merge Agent is a utility executable that applies the initial snapshot held in the database tables to the Subscribers. It also merges incremental data changes that occurred at the Publisher after the initial snapshot was created, and reconciles conflicts either according to the rules you configure or using a custom resolver you create.
A merge agent can fail due to of any of the following reasons:
The Merge agent cannot connect to the publisher.
The Merge agent cannot connect to the subscriber.
The merge replication metadata has been deleted on the subscriber.
This can happen when the merge agent has not synchronized within the defined retention period.
The subscription is marked as expired.
Query timeout errors.
Network connectivity errors.
The Merge agent cannot start because of memory exhaustion for the non-interactive desktop heap.
Incorrect parameters passed to the agent executable.
This issue can be resolved by ensuring that:
The Merge agent can connect to both the publisher and the subscriber.
Make sure that the merge agent account is added to the db_owner fixed role on the Publisher and the Subscriber databases.
When the subscription is marked for expiration, reinitialize the subscription.
There are no network or connectivity issues between the servers when the merge agent is running.
If the subscription metadata is deleted on the publisher, drop and recreate the subscription.
This can happen when the merge agent has not synchronized within the retention period.
Ensure the correct parameters are passed to the Merge agent .
Query the msmerge_agents and msmerge_history tables on the Distribution database to get more information on the agent failure. The Msrepl_errors table also contains information about agent failures.
Desktop heap issue
http://support.microsoft.com/kb/949296
Replication Merge agent
http://msdn.microsoft.com/library/ms147839.aspx
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 |
|
Target | Microsoft.SQLServer.2014.Replication.Distributor | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.2014.Replication.MonitorType.ReplicationAgentState | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor |
<UnitMonitor ID="Microsoft.SQLServer.2014.Replication.Monitor.MergeAgentState" Accessibility="Public" Enabled="true" Target="MS2RD!Microsoft.SQLServer.2014.Replication.Distributor" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2014.Replication.MonitorType.ReplicationAgentState" ConfirmDelivery="false" RunAs="MSRL!Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2014.Replication.Monitor.MergeAgentState.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>Merge$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericDistributor']/ConnectionString$</XPathName>
<ShowJobsWithUnknownState>false</ShowJobsWithUnknownState>
<EstimatedJobDuration>15</EstimatedJobDuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>