Script Multiple Objects [Easy]

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Have you ever noticed that you can only highlight 1 object in the Object Explorer in SQL Server Management Studio? This usually is enough for most things you do, but if you want to script multiple objects at once… it becomes a pain. Well there is a way to script multiple objects at once, and it’s super easy.

  1. Open the Object Explorer Details screen by selecting View -> Object Explorer Details.
    Script Multiple Objects 1
  2. Highlight the folder with the objects that you would like script. A list of all objects in that folder will appear on the right. This works for tables, stored procedures, etc…
    Script Multiple Objects 2
  3. Highlight all the objects that you want, right click, and select Create To.
    Script Multiple Objects 3

1 thought on “Script Multiple Objects [Easy]

  1. It looks like this works in SSMS 2008 too. I had never even known/used the Object Explorer Details before. And I was expecting it to create separate new scripts for each object but it looks like they’re combined in the same script. Awesome!

Leave a Comment

CommentLuv badge