Showing posts with label Management Studio. Show all posts
Showing posts with label Management Studio. Show all posts

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.

Monday, March 19, 2007

Tabbed vs. MDI Queries - SQL Server 2005

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.

Tabbed vs. MDI (Toolbar vs individual windows)

This is extremely simple, but I'm often surprised how many developers are debugging an issue but only looking at one query at a time. They often forget the exact item they are looking for. I switched to a windowed view a long time ago and found it useful to hold information in the background.


The default view in the Management Studio is to use tabs for all the queries (see snapshot). I know some developers like to see one statement at a time, but I'm usually referencing more than one query at a time.

To change the layout of the queries, chose Tools > Options from the menu. The first item under Environment gives you the option to switch between Tabbed documents and MDI (windowed).




Here is the result, all the queries are no longer in a tabbed view: