Simplify Your Database List with a Filter

Life can be easier when you block out the noise and only see what you need to see. Did you know you can do that with the list of databases in SSMS? As of the SSMS 16.3 2016 release, database filtering is possible.

Let’s take a look at how to hide databases we don’t want to see.

It’s Not Me, It’s You

For one example, let’s say we don’t want to bother with archive databases. They’re old and we’re just keeping around because a contract says it’s a requirement. Nothing wrong with that but we’re not going to be tuning these databases so we want to get them out of the way.

Maybe a server has databases for multiple applications and you’re only responsible for one of those applications. Maybe you handle one set of databases and someone else handles the rest. You may want to configure your SSMS environment so you only see what you’re responsible for.

Under the Rug

Let’s filter our database list. We have four variations of the AdventureWorks database:

If we right click on Databases, we can go to Filter and then Filter Settings:

In this case, I only want to see databases with 2019 in the name. I’ll set the Name property to filter where the name contains 2019:

If we go back to our list, we only have the AdventureWorks2019 database listed. You may also notice that the Databases folder now has “(filtered)” appended to indicate filtering is in place.

Removing the filter is even more simple. Right click on the Databases folder, go to Filter, and click the Remove Filter option.

Cover Your Mouth

While we looked at filtering databases above, there is also filtering that can be put in place for objects like tables, views, stored procedures, and more. If you’re working on the same environment every day, filters may be helpful to optimize your workflow.

Thanks for reading!

One thought on “Simplify Your Database List with a Filter”

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s