Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « Running sp_helpdb against a snapshot shows wrong files on SQL Server 2008Interesting UNION with ORDER BY behavior »
    comments

    Now that all my server are SQL Server 2008 I use SSMS with SSMS Toolpack and Toad. I don't really use Query Analyzer anymore. The other day I found out that you can hide objects you don't want to see in SSMS by using filters.

    Let's first look at some code. Create a new database named test, create a new schema named Denis and then add 3 tables to the dbo schema and 3 tables to the Denis schema. Just run the code below

    1. create database test
    2. go
    3.  
    4. use test
    5. go
    6.  
    7. create schema Denis
    8. go
    9.  
    10. create  table Test1(id int);
    11. go
    12. create  table Test2(id int);
    13. go
    14. create  table Test3(id int);
    15. go
    16.  
    17.  
    18. create  table Denis.Test1(id int);
    19. go
    20. create  table Denis.Test2(id int);
    21. go
    22. create  table Denis.Test3(id int);
    23. go

    Now in SSMS you will see the following if you expand the tables folder

    What if I only want to see the tables that belong to the Denis schema? Here is how you can setup the filter. Right click on the tables folder, select Filter and then Filter settings.

    That will pop up a window that looks like the image below

    For the Schema property select equals for the operator and type Denis as value. Click OK and now you will see the following when you navigate to the tables folder.

    If you want to remove the filter, just right click on the folder, select Filter and then Remove Filter.




    If you work in a team and you created several tables that all start with Report then you can create a new filter and just show these objects. This way you don't need to see any tables that your team members created. Below is a screen shot of a filter like that.

    Another cool feature is that you can filter on Creation Date, this gives you the ability to filter all that old Brownfield stuff that nobody maintains anyway because if you change one thing it will break everything else :-)

    So are you using filters in SSMS?




    *** Remember, if you have a SQL related question, try our Microsoft SQL Server Programming forum or our Microsoft SQL Server Admin forum

    About the Author

    User bio imageDenis has been working with SQL Server since version 6.5. Although he worked as an ASP/JSP/ColdFusion developer before the dot com bust, he has been working exclusively as a database developer/architect since 2002. In addition to English, Denis is also fluent in Croatian and Dutch, but he can curse in many other languages and dialects (just ask the SQL optimizer) He lives in Princeton, NJ with his wife and three kids.
    Social SitingsTwitterFacebookLinkedInHomePageFlickrLTD RSS Feed
    1331 views
    Instapaper

    2 comments

    Comment from: Ted Krueger (onpnt) [Member]
    Ted Krueger (onpnt) Pretty cool Denis. I didn't know you could do that.
    02/06/10 @ 16:16
    Comment from: SQLDenis [Member] Email
    SQLDenis Same here, I just found out the other day..this is mostly because I don't have any 2000 instance anymore and on my new laptop I did not even install Query Analyzer

    SSMS Toolpack is also awesome, you have to check out the snippets.....type LJ hit tab and it becomes LEFT JOIN and there are many more....

    Visual Studio user will love it because in Visual Studio cw tab tab becomes Console.WriteLine so this will be natural for them
    02/06/10 @ 16:32

    Leave a comment


    Your email address will not be revealed on this site.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)