By: Rajendra Gupta | Last Updated: 2016-08-29 | Comments (7) | SQL Server Management Studio
In this previous tip New Features in SQL Server Management Studio for SQL Server 2016, we have seen some of the new SQL Server Management Studio features and improvements. However, the tool has improved a lot since that tip and in this tip we will look at exciting enhancements to SQL Server Management Studio.
We have seen in tip SQL Server 2016 RC0 Installation and Configuration Changes that SQL Server Management Studio is now not a part of the normal SQL Server installation, we have to download it separately and install.
In this tip I am working on the latest SQL Server Management Studio July release which can be download from this link.
While working with this latest version of Management Studio I came across some important and exciting features that I will outline below.
Highlight Current Line in SQL Server Management Studio
First thing you will notice when connected to Management Studio is a box appearing in the Query Window. Basically the box is pointing to the current line position of the cursor.
As we move to other lines it moves to that line and we can also see a blue vertical bar to highlight this as shown below:
This is pretty useful to point out the current line however if we don't want to use this functionality, we have the option to disable it via: Tools -> Options -> Text Editor -> General -> Highlight Current Line. By default this options is enabled, so to disable remove the check box from the Highlight Current Line as shown below.
Searching for Options in SQL Server Management Studio
While exploring the option to disable the highlight current line option, I noticed there is a search feature to find options in the Tools -> Options menu. For example, if we want to search for "highlight current", the search will show which tree items include the string. For this example it shows Test Editor -> General.
This is a good enhancement to search for a particular options instead of browsing each tab when we do not know exactly where the setting resides.
SQL Server Management Studio Quick Launch
Another search option provided in Management Studio is the Quick Launch, which we can see on top right of the interface:
This is a new search tool to launch menu items, options and files. It will not work for searching text inside a Query Window.
Suppose you want to use the Database Engine Tuning Advisor, if you type "database" in the Quick Launch it will show all the options matching the word "database" as a link:
Clicking on the option will open the item which in this case is the Database Engine Tuning Advisor:
Later when I search in the Quick Launch for "data", I can see the Database Engine Tuning Advisor listed in the Most Recently Used section. Quick Launch caches the last 5 opened items in the Most Recently Used section that match the criteria.
Basically it includes four sections as part of search:
- Most Recently used: Matching results from most recently used search, maximum 5
- Menus: Matching results available from menu section.
- Options: Matching results from Options section.
- Open documents: Matching results from open document section.
If we type @ in the quick launch, it gives you shortcuts by which you can limit the search.
The options are:
- @mru: for searching only in Most Recently Used
- @menu: for searching in Menus section
- @opt : for searching in Options section
- @doc: for searching in Open Documents section
Suppose we want to search Live Query Statistics for Menus only, we type:
To see options for Quick launch, type quick launch in the search box and click on the Options item:
This shows the options for quick launch as:
We can see we have the option to:
- Enable or disable the quick launch functionality
- Enable or disable the quick search area (i.e. if we don't want to search in Open Documents, remove the check box)
When disabling a Quick Launch option from search, SQL Server Management Studio needs to be restarted for the change to commit.
We can see matching results for Open Documents is not shown after a Management Studio restart:
SQL Server Management Studio Tabs Customization
When we open a New Query Window, by default its name contains the following information: FileName.Instance Name.Database Name along with the credential used to connect as shown below:
Sometimes we don't want that much information to be shown. To customize the display, go to Tools -> Options -> Editor Tab and Status Bar.
Here we can see the options for Tab Text:
- Include Database Name - True
- Include File Name - True
- Include Login Name - True
- Include Server Name - True
Suppose we want to have only server name and database name for the tab text, so disable the other options by setting them to False as shown below:
If we open a new tab it will include only server name.database name:
Pin Tabs in SQL Server Management Studio
In a New Query Window tab there is a new toggle pin as highlighted below:
This feature enables us to pin query windows we like or use frequently as shown below (i.e. backup script and performance script).
I have two pinned tabs and after I open several new query windows I can still see my pinned tabs.
To better organize the pinned tabs, we can keep them on a separate row by navigating to Tools -> Options -> Tabs and Windows then check the box for Show pinned tabs in a separate row as shown below.
Now the pinned tabs will be in a separate row as shown below which make it easier to manage.
One item to keep in mind is that if we close Management Studio all pinned tabs will be removed. When we start a new session, we will have to pin the tabs once again.
- Keep in mind the new Management Studio enhancements outlined in this tip to improve your productivity.
- In the next tip we will be exploring some more important changes in Management Studio.
- Download and explore SQL Server 2016.
- Check out SQL Server 2016 tips.
- Read more about SQL Server 2016 Technical Documentation.
Last Updated: 2016-08-29
About the author
View all my tips