Scripting all the SQL Server Agent Jobs through SQL Server Management Studio

There are hard times, when we need to script all the SQL Server Jobs which are running in one server and when we need to move it to some other server. Its been a very challenging task for a DBA that to deploy same set of jobs in multiple servers. Here, is a way to script all the SQL Jobs from SQL Server Management studio and port it to some other servers in one shot.

So, How to do this?

Step 1: Login to the SQL Server instance through SQL Server Management Studio.
Step 2: Expand SQL Server Agent >> Jobs
Step 3: Hit F7 (or) Click on menu ->View >> Summary. This will list out all the options under SQL Server Agent. Click on Jobs on the Summary Page view.
Step 4: Now ALL jobs would be listed out there.
Step 5: Press Control-‘A’ key and choose all the Jobs which needs to be scripted (OR) Hold Control Key to select specific/Set of Jobs which you want to script out.
Step 6: Right click >> “Script Job as” >> “Create To” >> File (provide the file name and save it on the desired script)

Please refer to the screenshots for reference:

Image 1:

All_Jobs_scripts_1

 

Image 2:All_Jobs_scripts_2

 

Leave a comment