Monday, March 16, 2020

Scripting Jobs in SQL Server

Have you every wanted to save your SQL Server jobs to a SQL script file?  It's not straight-forward from the interface, but is easily done.  Just follow these steps:

  1. In SQL Enterprise Manager, open the list of Jobs by opening the Object Explorer tree to SQL Server Agent -> Jobs
  2. Next, press F7 to open the "Object Explorer Details" (Can also use the menu View -> Object Explorer Details)
  3. You should see all your jobs listed.  If not,  you might need to navigate through the list and find them.
  4. Select the jobs you want to backup (You can use Shift and Ctrl)
  5. Right click and select Script Job As -> Create To -> File
  6. Finally enter a filename and press Save
I hope this makes your life easier.  Now get to backing up those jobs!

No comments:

Post a Comment