stopping scheduled jobs at once and only running few
I have n upcoming project where the scheduled jobs has to be stopped by 2:00pm and only couple jobs has to be run at that time. In those couple jobs, one of them got multiple steps and only the 1st step has to be run. probably i can change the settings "On Success action" "quit the job reporting success" I thought of stopping the sql server agent, but that will stop all the jobs. I created couple of new jobs which only runs the 1st step. I cannot go and manually stop all the jobs and run only the 2 which i wanted. so how can i do it ?
The easiest would be to create a script that disables all enabled jobs, and records which jobs were disabled (insert a record into a table). Then alter the two jobs to quit reporting success after the first step as you mentioned. Then at the end of your window (assuming some sort of maintenance is being done and thus the need to disable the jobs), run another script that re-enables the jobs that were disabled and logged to your table (just read from that table to figure out what needs to be enabled).