Blog Post

Quick Filtering in SSMS–#SQLNewBlogger

,

I saw someone limit the databases they see in SSMS, which isn’t something I often do, but I thought this was great.

A Long List

This is the list of databases on a demo instance I have. While it’s a lot since I do a lot of testing with customers and colleagues, I see plenty of people will lists of databases longer than this.

2023-09-18 09_39_38-Window

I also watch them scroll like I do when trying to find an object in a database.

However, for demos, this is a lot, so I like to slim things down. I used to have a script to detach all the databases and then attach the ones I need, but that’s time consuming and once in awhile, I need a different database, so that’s an issue.

I saw the someone filter their list by clicking the filter button in the Object Explorer. This is the funnel button shown here:

2023-09-18 13_57_35-Window

Once you click this, a dialog appears that let’s you enter your filter criteria. I’ll use a simple filter of “zero” to limit to those databases in my zerodowntime demo.

2023-09-18 09_39_25-Window

Once I click “OK”, I see only those databases listed.

2023-09-18 09_39_18-Window

If I want to get everything back, I can click filter again and then delete my criteria, or click “Clear” filter. That gets me the entire list back.

2023-09-18 09_39_32-Window

Easy.

SQLNewBlogger

This post was something I jotted a note about when I saw someone do this. The note was literally “write about filtering in SSMS object explorer”. I took that and wrote this post in 10 minutes, including time to grab screen shots.

You could do this as well, showcasing the knowledge that you’re learning to use tools better, which make you more productive. Employers love that.

Write your own post with more advanced filtering.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating