Scripting out multiple scripts from the Object Explorer Details window.6
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.
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.
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.
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!
Category: Microsoft SQL Server, SQLServerPedia Syndication, SSMS | Tags: microsoft sql server, Scripting, SSMS
6 thoughts on “Scripting out multiple scripts from the Object Explorer Details window.”
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
This one is great. Never fails to amaze the people I show it to.
It also works for deleting multiple objects, or any sort of thing you wish you could to multiple objects.
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.
Oh and sorting! It lets you sort! This is the best window. I learned it from Kendra Little.
And don’t forget you can also pick your cols. And they persist. Y I love this window too.
[…] what’s it good for? Well, to start with you can use it to script out multiple items at once. I’ve used this recently to script out everything under a specific schema. The upside is that […]