SQL Server – Scripting out all SQL Agent Jobs

 

We have a 3-Node AlwaysOn Availability Group setup.​​ I wanted to copy all SQL Agent jobs from the primary replica to the secondary replica. The easiest way is to script out all the jobs​​ at the same time. The following are the steps to do that.

 

 

  • Go to View > Object Explorer Details.

 

 

 

 

  • On the Object Explorer Details window, click SQL Server Agent.

 

 

 

 

  • Click Jobs.

 

  • ​​ Highlight all the jobs to be copied. Right-click > Script Job as > Create To >

 

s

 

Knowledge worth sharing...Share on linkedin
Linkedin
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter
Bookmark the permalink.

Leave a Reply

Leave a Reply

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