SQL Server Management Studio provides a functionality to add external tools(Windows Bases or .Net Based).
This will be in great use when an external executable file has to be run from SSMS.

How to add external tools to SQL Server Management Studio?

The step by step approach to add External tools to SSMS is given below. (Screenshots depict how Notepad has to be added as external tool to SSMS)

Step1:

Open SSSMS

Step2:

Click On Tools Menu Item. Select External Tools… Option

SSMS External Tools Option

Now External Tools Dialog Box pops up. Using this Dialog Box External tools can be added to SSMS.

External Tools Dialog Box
External Tools Dialog Box

Step3:

Now select the command for the external tool by clicking on the browse button.
The below screenshot shows notepad being selected as command from location C:WindowsSystem32notepad.exe

Select Notepad for external tools command
Notepad Selected as External Tools Command

Update the Title with the title you want for this extenal tool(basically the name of the external tool).
If the external tool has arguments then add them in the arguments section.
Also add the intial directory if initial execution directory is needed by the external tool.

For adding Notepad as an external tool there is no mandate to add Arguments and Initial directory.
The tool Title is given as ExternalToolNotepad.

Now click on apply, Then click on OK.

You can find the added external tool in the Tools Menu item.

Using newly added external tool
Using newly added external tool

Now when the external tool is clicked in the tools menu, the tool opens up with the defined options in External tools Dialog.

How to add toolbar Button for External tool?

External tools can be easyly accessed when a toolbar button is added to external tool.
This can be acheived using Customize Option in the tools menu.

Customize External tools
Now Customize dialog box pops up
Select Tools under Catagories in the commands tab.
Drag the External Command1 item in the Commands section to the location on SSMS where you want the button to be added.

Select Tools and External Command1

The cursor initlly has a x mark. As you drag the item the Cursor changes into a + mark indicating it can be added at that location. Leave the cursor at the location where external tool button is needed.

External Tool Added To ToolBar
External Tool Button Added To ToolBar

Using this method External tool can be added to the tool bar, or as a menu item.

Leave a Reply

Your email address will not be published. Required fields are marked *