Blog Post

Filtering in SSMS

,

Do you spend seconds, maybe even minutes trying to find things in SSMS?  Ever find yourself scrolling up and down thrown the tree trying to find that one specific object you seek?

Did you know it doesn’t have to be that way?  Microsoft has provided us the tools to help improve our efficiency in these matters.  Have you heard of filters?  I’m sure you have.  Did you know that there is a filter ability in SSMS?


Let’s see how that can be done using the master database in our examples.  I have expanded the tree to get down to the System stored procedures in the master database within SSMS.  It looks something like the following image.

From here, you can see that the tree looks pretty much like any other master database when viewing the stored procedures.  You have miles of stored procedures to scroll through.  Should you need to modify a stored procedure (in one of the user databases) this can be a bit cumbersome.

So let’s see what we can do to simplify this a little bit.

When you right click on the folder that contains your object you need to find, you are presented with a context menu.  One of the options on this context menu is “Filter.”

If we follow the menus, we will get something like this.

If you click on Filter settings, you will get a new window like this:

For this example, I have chosen to filter on the term “sp_helptext.”  Once I click OK, I will see a new filtered tree in SSMS that looks like this.

As you can see, I have just reduced my list of objects substantially.  I only have one stored procedure in this case to look at.  If in a user database and I need to modify that proc, then I can more quickly get to work.  This is especially handy if you have thousands of procs, or the procs have extraordinarily long names, or there numerous procs that are similar in name, or in my case – all of the above.

There you have it, my quick and easy Holiday gift to you this Holiday season to help you become more efficient.  BTW, thanks to a friend for pointing this out to me (Jack knows who he is ;) ).

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating