Russ Thomas – SQL Judo

The Art of SQL Server Database Administration, Development, and Career Skills for the Technically Minded

SSMS Day 12: Modifying Toolbars

31 Days of SSMS: Table of Contents

I got a little preachy yesterday with all my “you should script everything” post.  We’ll it’s day 12 – today we’re going to go back to bending SSMS to your will and play around with the toolbars.

Once upon a time I was primarily a data architect.  I spent much of my days creating glorious works of 3rd normal art.  Eventually I found my way into being a full time DBA and my collection of 3rd party tools started growing to assist with all the new tasks I found myself responsible for.

I almost always had SSMS open and often wished I could integrate those tools into the user interface of SSMS.  Fiddling around one day I discovered I could create my own toolbars, make my own buttons, and call external applications from those buttons.  It even let me customize the icons.  At some point within the last few years Microsoft stopped letting you customize icons (bummer in my opinion) but you can still add external applications, scripts, activities, etc to your toolbars and menus.

external

External Tools

Click the tools menu option and you’ll notice an item titled “External Tools”.  Clicking this will bring up a dialog that allows you to create a menu item pointed to your desired external resource.

Example:  In this case, I’m creating a new tool called ER Studio to bring up my Embarcadero Entity Relationship Studio application.  I’ve given it a custom name, set the application, and set the working directory to whatever project SSMS currently has open.  You’ll notice a few other options.  I could pass a command line type argument as well as a variety of other options.


tools

newtoolThis tool will now automatically show up on my tools menu item.  I’m still ticked I can no longer customize an icon for the menu item but the good news at least is that you can still put an ampersand ‘&’ in the menu item name and create an accelerator key for it.

Getting this new “external tool” to show up on a toolbar isn’t nearly as straightforward.

Customizing Toolbars

To accomplish this first bring up the toolbar customization dialog by selecting the menu item under tools->customize.  You can also right click anywhere on the toolbar and selecting customize.  The first tab is the ‘Toolbars’ tab.  You can either select an existing toolbar to add the external command to or create your own by clicking ‘Add’.

Under the ‘Commands’ tab you’ll want to select the toolbar radio (or other destination for your button) and then click ‘Add Command’.  Then under command category select tools.  In this dialog your external tool is not identified by name.  There are a large handful of ‘external command’ placeholders instead.  You’ll have to know the numerical position of the specific tool you’re interested and then select the ‘external command’ number that lines up.  In my case it’s easy –  External Command 1  – I only have the one.

addcommand

You should now see your external command visible on your toolbar.

Other Toolbar Options

You can modify your toolbars in many other ways.  You can map new buttons to existing SSMS commands that don’t already have a button assigned.  You can delete buttons or entire toolbars.  You can add separators by clicking ‘Modify’->’Begin New Group’ and regroup your icons in a way that makes sense to you.  You can go with a super clean SSMS with almost no toolbars/buttons or make it look like I.E. 6 sporting 20 additional malware looking search bars.  Remember those days?

Every option at your disposal is found either under the Tools->Customize option or by simply dragging and dropping the actual toolbars themselves.  if you mess things up too badly you can always reset them to factory default by using the ‘Import and Export Settings’ Wizard also located under the tools menu.  Look for the reset option once you open the Wizard.  This won’t get rid of any external commands you may have created, but it will put the toolbars back the way they were upon first install.

export

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: