SQL Server Developer Center > SQL Server Forums > SQL Server Replication > Replication Monitoring and Notifications
Ask a questionAsk a question
 

AnswerReplication Monitoring and Notifications

  • Thursday, November 05, 2009 6:44 PMBrandon Jay Williams Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I'm interested in writing a service that notifies via text message and/or email if replication goes down for an extended period of time.  Does anyone know the recommended way of doing this?

Answers

  • Tuesday, November 10, 2009 7:37 PMHilary CotterMVP, AnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Only certain classes of errors seem to raise alerts.

    I normally have another job step which is run when the agent fails and this sends out email. I have a more dependable experience if I do it this way.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

All Replies

  • Friday, November 06, 2009 5:24 PMVinay Thakur Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Replication runs  as different jobs :

    eg .This is for transaction replication:

    >>subsriber.-- generally runs once at the begining.
    >>log reader -- takes the log and
    >>distributor -- distributes the data to subsriber.

    so you can setup alert on job whenever it fails.

    HTH.
    Vinay


    Vinay Thakur http://vinay-thakur.spaces.live.com/ http://twitter.com/ThakurVinay
  • Tuesday, November 10, 2009 7:33 PMBrandon Jay Williams Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have the "Replication: agent failure" alert enabled and set the alert to be raised based on error number 14151.  I have simulated this failure and the error 14151 does show up in the error logs under C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG.  However, when I examine the "Replication: agent failure" Properties->History in SQL Server Management Studio, its showing its "Number of occurrences:" to be 0.  How can this be?  The error is definitely occurring but SQL Server Management Studio is not displaying this.
  • Tuesday, November 10, 2009 7:37 PMHilary CotterMVP, AnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Only certain classes of errors seem to raise alerts.

    I normally have another job step which is run when the agent fails and this sends out email. I have a more dependable experience if I do it this way.
    looking for a book on SQL Server replication? http://www.nwsu.com/0974973602.html looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941