For maintenance tasks on my LogShipped environment I run T-SQL script to disable the copy/restore agent job for the duration of maintenance and then enable when done.
When I enable the jobs via TSQL it seems the schedule hangs (at last run date) and does not execute future schedules and LS DBs fall out of sync. Restarting the SQL Agent & manual start of the job resolves the issues ok.
SQL Server 2016 SP1.
Using msdb..sysjobs to disable/enable the job and
msdb..sysjobschedule to disable/enable the schedule
Anyone any ideas?
Asked by CherryDz
(37 rep)
Jan 8, 2019, 03:23 PM
Last activity: Jun 15, 2025, 08:04 AM
Last activity: Jun 15, 2025, 08:04 AM