Sample Header Ad - 728x90

remove a step from sql agent jobs

-2 votes
2 answers
1549 views
I copied a bunch of jobs from an HA server to a regular server and I need to delete only the first step( checks for the primary) on these jobs not all jobs. Any suggestion? this is the query I used to find them SELECT a.job_id ,name ,enabled ,b.command ,b.step_name ,b.step_id FROM msdb.dbo.sysjobs a INNER JOIN msdb.dbo.sysjobsteps b ON a.job_id = b.job_id where step_name like '%check prima%'
Asked by dani (43 rep)
Oct 2, 2019, 04:30 PM
Last activity: Oct 2, 2019, 07:41 PM