Automatically Enable or Disable Jobs Based on HADR Role

Use this to detect whether a specified DB is primary or secondary in DB Mirroring or Availability Groups session, and automatically disable or enable a list of jobs accordingly. Run this from a scheduled or event-based job in both HADR servers.

105 times
Add to favorites
E-mail Twitter Digg Facebook
  • Is there any input needed for stored procedure ChangeJobStatusBasedOnHADR?
    3 Posts | Last post January 16, 2019
    • As per my understanding we have to follow these steps HADR:-
      1) Create stored procedure on MSDB & change job names in the stored procedure
      2) Create one job
      So please tell me any other things need to be changed.
    • No, that's about it.
    • Just don't forget to do this on all HADR replicas.