Scripting out multiple scripts from the Object Explorer Details window.

5

December 16, 2015 by Kenneth Fisher

A few weeks ago I was reading a blog post by Andrea Allred (b/t) and was just amazed by what I was reading. I’ve never been a big fan of the Object Explorer Details window. It didn’t seem to really add anything. But Andrea pointed out that it will actually let you script (or delete) multiple objects at once.

First a demo then some discussion.

You can open this window by either hitting F7 or by going to the View >> Object Explorer Details.

script multiple objects1

Then you can navigate to the objects you are interested in (tables, views, stored procedures etc). Note: As the name implies the Object Explorer Details window is linked to what you have selected in the Object Explorer.

script multiple objects2

Now select one or more objects. You can select multiple objects by using the shift or control key just like in Windows File Explorer. From there you right click on one of the selected objects and select either delete or script.

script multiple objects3_1

There are other methods of doing this of course, which I plan on going into in another post, but for now this has some great benefits. First of all you can filter the list just like in object explorer. So if you need to script just a portion of your 1000+ stored procedures you can filter the list first to make it easier to find them. Then let’s say you want to script all (or most) of a type of object, or filtered list of objects. Just hit control-A to select them all, then unselect anything you don’t want to script by using the control key and the mouse.

Nice little productivity tip hu? Thanks Andrea!

5 thoughts on “Scripting out multiple scripts from the Object Explorer Details window.

  1. notarian says:

    This one is great. Never fails to amaze the people I show it to.

  2. notarian says:

    It also works for deleting multiple objects, or any sort of thing you wish you could to multiple objects.

  3. Yep, this is one of the very few GUI features I use all the time. PS is great at scripting objects, but sometimes it’s just too heavy when you just need a handful of tables… or just 2.

  4. notarian says:

    Oh and sorting! It lets you sort! This is the best window. I learned it from Kendra Little.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 1,646 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: