In the Scripting All The Jobs On Your SQL Server Instance Into Separate Files By Using SMO post I showed you how you can use SMO to script all the jobs into separate files. But what if you want to have them all in one file? You can of course use SMO for that or you can do it from SSMS. Most people don’t know about this and that is the reason for this little post.

You know that you can not select more that one job if you expand the job folder, but you can if you are in detail view

So navigate to the job folder, press on it and hit the F7 key or from the toolbar: view–>Object Explorer Details

That will bring up a view like the following

Now you can select the jobs that you want, right click–>Script Job as–>CREATE to–>File and you specify the location and that is all.

Hopefully this will be handy for you.

*** If you have a SQL related question try our Microsoft SQL Server Programming forum or our Microsoft SQL Server Admin forum