none
Monitor Distributor Agent in Transnational Replication RRS feed

  • Question

  • Hi,

    I wanted to monitor the Distributor Agent's running status in Transnational Replication. I want to get alert when it is stopped.

    Tried to create alert for the same. But its not working as expected (does not see any occurrence even when Distribution Agent is stopped).

    USE [msdb]
    GO
    EXEC msdb.dbo.sp_update_alert @name=N'Dist Agent Stopped', 
    @message_id=0, 
    @severity=0, 
    @enabled=1, 
    @delay_between_responses=0, 
    @include_event_description_in=1, 
    @database_name=N'', 
    @notification_message=N'Distributor agent is not running', 
    @event_description_keyword=N'', 
    @performance_condition=N'Replication Agents|Running|Distribution|=|0', 
    @wmi_namespace=N'', 
    @wmi_query=N'', 
    @job_id=N'00000000-0000-0000-0000-000000000000'
    GO

    EXEC msdb.dbo.sp_update_notification @alert_name=N'Dist Agent Stopped', @operator_name=N'XYZ', @notification_method = 1
    GO


    Thank you,

    Udham Singh

    Tuesday, August 6, 2019 11:15 AM

All replies

  • set up a job notification when the job completes.

    Tuesday, August 6, 2019 2:07 PM
    Moderator
  • Hi Hilary,

    Yes, that's one way to achieve the goal. 

    But this does not seem efficient, we have number of severs where transnational replication is running, we would need to edit each distributor agent. 


    Wednesday, August 7, 2019 5:08 AM
  • Hi, Udham.

    Perhaps SQL Server Agent > Alerts > <choose which Alerts to enable-disable> might be of assistance.

    Namely, if you select, e.g. Replication: agent failure and Replication: agent retry, it might provide the notification (e.g. to your email) once there is an issue with the Distribution Agent.

    (concretely, I have set up the Database Mail to shoot emails to my email address, and then enabled and configured the Alerts to send an email once there if a failure or a retry - so far it seems to have worked flawlessly)

    With kind regards,

    Bogdan


    BogdanU

    • Proposed as answer by BogdanU Monday, October 14, 2019 10:13 AM
    Wednesday, September 25, 2019 12:05 PM