SSMS - SQL Server Management Studio

Script all Agent Jobs at once in SQL

SQL Server Management Studio may be easy to work with, however,right click on each job and select “Script Job as” to script up each one individually may take a long time, if you have too many jobs on a specified server.

Why would I need all jobs to be scripted?

Answer is simple, if you need a backup or you need to move or create jobs to different server. Let’s see how to do it

  1. Navigate to SQL Server Agent Node
  2. Select Jobs
  3. Open the ‘Object Explorer Details’ from the View menu in SSMS
    • You may also use the shortcut key for the same
      • Hit the F7 key on the keyboard (this will open the Object Explorer Details window)
  4. Highlight the jobs you want to export From the Object Explorer Details (you may use the Ctrl button while clicking to select individual jobs) and then right click and select the scripting option you want
  5. Select “Script Job As…” >”Create To..” > “File…”

Image result for Notes icon  This activity can be done for Exporting other object like Users (Logins), Linked Servers etc.


If you liked this post, say thanks by sharing it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.