SQL Tip-8 | How to script out multiple SQL Server jobs at once
Migrating SQL Server jobs from one server to another is a critical task and there are many alternatives available for the same, the easiest one available is to script out each and every job and re-create them on the destination server.
If there are a few jobs you can very well script out each and every job individually, but once the count of jobs or number of servers to be migrated increases this seems to be another challenge.
For this reason SQL Product team provided a very convenient (but not so popular) option to script out all the jobs.
All you need to do is select jobs in the object explorer and open the Object Explorer Details Tab (shortcut key is F7) – Once the object explorer details tab is in view, you can now select multiple jobs by holding Ctrl (control) key.
Once all the desired jobs are selected right click and select script job as from the context menu. Please refer the attached Screenshot to get more idea.
Enjoy!
Hope you enjoyed the post, feel free to leave a comment. 🙂
Thanks,
Sarabpreet Singh Anand
Subscribe now to get latest Tips\blog posts in your Inbox
Follow @SQLDB