What do you do with the SQL Agent Jobs when the HA environment switches between primary and secondary? Do they just let the jobs on the secondary fail and create log entries when it can't access the database?
Asked
Active
Viewed 37 times
0
-
What kind of job are you specifically referring to? – KASQLDBA Aug 24 '20 at 23:31
-
Actually, when using HA (AG), I change all the job to add one step at the biggining that will check if the server is primary and will "stop" if not. That way, the jobs can have the same schedule on all nodes and a failover will not make it stop working – Dominique Boucher Aug 25 '20 at 13:18
-
@DominiqueBoucher could you please share the step you add? – Protocol Aug 25 '20 at 14:48
-
@KASQLDBA e.g backup, – Protocol Aug 25 '20 at 14:49
-
I can see someone gave a full answer under https://dba.stackexchange.com/questions/45137/sql-server-agent-jobs-and-availability-groups – Dominique Boucher Aug 25 '20 at 15:31