Database.ca SQL Server Blog

My Blog

Monday, August 26 2013

Keywords: Custom toolbar, SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Optimize your environment by customizing your SQL Server 2008 R2's Toolbar

The tips in this article do not apply to SQL Server 2012. For the latter, I have written a separate article which you could find here.
 
Improve the speed and efficiency of your T-SQL programming by creating custom toolbars in your SQL Server Management Studio. The goal would be to create a toolbar where you place the commands that you personally use and need most often, and that they are currently non-existent in another SSMS active toolbar.

 

So in this walkthrough, we will create a custom toolbar containing 4 commands:
1) Comment block
2) uncomment block
3) UPPERCASE block
4) lowercase block
 
With that in mind, let's go ahead an click on 'Cutomize' under 'Tools' menu.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Click on 'New' button and name your custom toolbar something that you like and will be easy to remember. I'm naming it after myself in order to easily detect it in a list of toolbar anytime in the future.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Once created, make sure to check off (select) the newly created toolbar on the list. You will then see a little small (and inactive) menu appear somewhere on the screen. You can drag and drop it anywhere within SSMS toolbar space you would like.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Do not close the window yet. Navigate to 'Commands' window.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

For the sake of this exercise only, go to Edit category and find 'Selection Lowercase', and literally drag and drop it to the empty toolbar you just created.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

You will now see the 'Selection Lowercase' button appear on the toolbar, albeit inactive, because no text has yet been selected on the screen.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Go ahead and drag and drop the other 3 commands.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

We are done creating our custom toolbar, but it is still inactive...to activate it we would need to open and work on a script file.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

I opened a disconnected script file and typed some random text in it...select the word 'test' in it and clicked on 'Make Uppercase'. You could now create your own custom toolbars quickly and easily.

 

Custom toolbar,  SQL Server 2008 R2, Toolbar, SQL Server Management Studio Tool bar, SSMS Custom Toolbar

Written by Ramin Haghighat