Category: Blog

  • 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.

  • SQL Saturday Denver 2023–VCS Primer for the Database slides

    My slides are here: VCS Primer Denver 2023

    This was an overview of what version control is, and the basics of Git.

    Not too many questions, but if you have some, ask.

  • Future Data Driven 2023 is This Week

    The Future Data Driven 2023 virtual conference is coming on Wednesday, September 27. Register today and save a note in your calendar.

    The event has  a great schedule (scroll down) with quite a few sessions that I will try to watch. Take a minute and flip through the list. If anything catches your eye, block your calendar and register today.

  • Opening the SQL Prompt Command Palette

    A few years ago SQL Prompt added a command palette to let you search the commands available. This is similar to the same concept in Visual Studio Code, ADS, and various other tools. This post looks at how to get to this tool in SSMS.

    This is part of a series of posts on SQL Prompt, which is an amazing productivity tool from Redgate Software.

    Opening the Palette

    You can also open the Command Palette from the menu. In the SQL Prompt menu, it is the first item. You can also see there is a shortcut of ALT+S below here.

    2023-09-04 04_44_26-

    When I click this, I’ll see the full list of palette commands. This is a large window, and across the top I can filter things. In the complete list, you see various things: objects, snippets, and refactoring commands. We also have the Prompt behavior settings as well.

    2023-09-04 04_44_43-SQL Prompt_ Command Palette

    For example, I could look for things with “brackets”. I see a few things that are relevant. I can pick any of them if I want that apply to my code or change the behavior of the tool

    2023-09-04 04_52_25-SQL Prompt_ Command Palette

    Adding to the Menu

    If you can’t remember the shortcut. or don’t want to use the menu, you can add this as a button in the toolbar. Here’s the easy way. When you installed SQL Prompt (or the Toolbelt), there is a Redgate toolbar added. Mine looks like this:

    2023-09-04 07_29_16-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

    I clicked the “Add or Remote buttons ” and got a list of buttons on this toolbar. I can click “Customize if I like. That opens the dialog below.

    2023-09-04 07_51_53-Customize

    Now click “Add Command”. That gives you a list of items in all the menus in SSMS. Pick the SQL Prompt menu on the left (first one). Then scroll down and find “Open command palette” in the right side. Select it and click OK.

    2023-09-04 07_52_16-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

    Now you have this in your toolbar.

    2023-09-04 07_52_25-SQLQuery3.sql - ..dlm_1_dev (WAY0UTWESTHP_way0u (92)) - Microsoft SQL Server Man

    Now one click, and you have the palette.

    FWIW, you can use this trick to add any menu item to a toolbar that you want.

    UPDATE: A comment asked about partial matches, and you can see I see partial matches for “Addre”.

    Partial match of a word in the command palette