Thursday, April 12, 2007

Show/Hide Results Pane -- SQL Server 2005

Attention! Unfortunately Blogger lost all the screenshots for this post, but I created a new post for SQL Server 2008 that is virtually identical.  You can get there by following this link: Show/Hide Results Pane – SQL Server 2008

I've been using Microsoft SQL Server 2005 for a few months now, and I've noticed a few differences between the SQL Server 2000 Enterprise Manager / Query Analyzer tools and the new Management Studio. I'll post some quick things I did to feel more at home in the new development environment.

Show/Hide Results Pane

One of the simplest and most useful features when debugging a script is to able to run your query to see some results, then hide the results pane to continue tweaking the sql code. This feature was a button in Query Analyzer in SQL Server 2000, but for some reason disappeared from the default buttons available in SQL Server 2005's Management Studio. Well, the button may not exist as a default button, but it's easy to add it back in.

After running a script in a query window, the window splits between the script and the results (each referred to as a pane). See the snapshot above.

To add a button to hide the results pane, click on the little down-arrow at the end of a toolbar and choose "Add or Remove Buttons", then choose "Customize..."

The Customize dialog window will open with the "Commands" tab selected. Now we only need to find the command we are looking for. Under "Categories:", choose "Window". Then under "Commands:", find the command "Show Results Pane".

Once you have located the "Show Results Pane" command, you have to click and drag it to where you want it to be located on the toolbar.
You can now Hide the Results Pane

Or you can Show the Results Pane

Originally I had my button located on the Standard toolbar, but eventually I figured out it made more sense to add it to the SQL Editor toolbar. It's pretty easy to find the SQL Editor toolbar - it only displays when you are working in a query window.


  1. Hi Thanks for the tip i was looking for this from ages. though i knew the CTRL+R key shortcut i wanted a tool bar button.


  2. Thanks for the feedback! I know it's a simple change, but I figured there were more people than just me who wanted the button.

  3. Hi Jason,

    Many thanks for your tip, I was looking for ages as I have been used to having this button for many years. Why would MS change this default all of a sudden, and leave other buttons on there such as 'Specify Values for Template Parameters'?!

    It's good to know there are people like you who take the time and trouble to add a very clear illustrated help article like this.


    Andy, Brisbane

  4. Thank you for this tip. I was getting frustrated for not having this simple feature. I was really glad to find your blog that explained how to do it.

  5. How do you add back Ctrl+R back to this menu. What happened is, I installed viEmu and it screwed up all the keymappings after uninstalling it. My question is, How does one MAP CTRL+R to "Show Results Pane".
    Thanks and warm Regards
    Arnab M

  6. arnab:
    I'm not sure how to fix this, but you might want to try resetting some of your SSMS settings back to their defaults.

    For example, there is a "Restore to Default" button under:
    Tool > Options.
    Expand "Environment" and choose "Keyboard".

    This example probably won't fix the issue, but there might be a few other restore buttons in the options that might work for you.

    Good luck.

  7. thx a lot, 2 yrs since I was looking for it

  8. Thanks, button is more practical than the Ctrl-R shortcut.

  9. Thank you so very much. God bless