Forum Discussion

AndrzejSzczechla's avatar
AndrzejSzczechla
Copper Contributor
Jan 11, 2023

Transactional replication - what does sys.sp_MSrepl_monitor_job_at_failover procedure do?

Hi,

There are a few maintenance jobs created by transactional replication.

Among others there is

Monitor and sync replication agent jobs that runs procedure sys.sp_MSrepl_monitor_job_at_failover.

 

I'm not able to find information about this job or procedure. Especially I tried this page:

https://learn.microsoft.com/en-us/sql/relational-databases/replication/agents/replication-agent-administration?view=sql-server-ver16#replication-maintenance-jobs

 

Can you help me?

 

Best regards

Andrzej

2 Replies

  • Hi AndrzejSzczechla ,

     

    The document you mentioned explain very good what each job is doing. I can elaborate a bit more if needed but I am not sure what you are looking for. Check if this help you (please try to elaborate a bit more if this is not what you are looking for):

     

    Replication agents run multiple tasks using executables, which can also be called directly from the command line. These include:

    • Replication Snapshot Agent: snapshot.exe
    • Replication Distribution Agent: distrib.exe
    • Replication Log Reader Agent: logread.exe
    • Replication Queue Reader Agent: qrdrsvc.exe
    • Replication Merge Agent: replmerg.exe

    For more information check this document which also include a link to more detail about each executable: https://learn.microsoft.com/en-us/sql/relational-databases/replication/agents/replication-agent-administration?view=sql-server-ver16&WT.mc_id=DP-MVP-5001699

     

    The jobs which you speak about are probably these who run the above executables.

     

    Note: if you want to find all the system tables related to the jobs then you can use a simple query to search the content of the jobs steps. Use SELECT from system tables msdb.dbo.sysjobsteps inner join with msdb.dbo.sysjobs (on the column job_id on both tables).

     

    Note: To view the definition of a procedure use the built in stored procedure sp_helptext.


    To get the exact information of the SP you can also go direcly o this page which present a link to each one: http://www.g-productions.nl/category.php?category=Replication&cat=1

     

    • AndrzejSzczechla's avatar
      AndrzejSzczechla
      Copper Contributor

      Hi Ronen_Ariely 

       

      Thank you for your time and answer.

       

      You are right - the documentation is very good.

      But there is no about job Monitor and sync replication agent jobs and no about procedure sys.sp_MSrepl_monitor_job_at_failover (about others tables and procedures used by transactional replication there is a lot information).

       

      I think this is a gap in the documentation.

       

      I want to change the frequency of this job. By default it runs every 1 minute - it's too often for us.

      I try to find some information about this job to be sure that I can change the frequency. 

       

      Best regards

      Andrzej

Resources