SQLMedic

Object Explorer Menu extension for SSMS

Object Explorer Menu is a free, open-source extension for SQL Server Management Studio (SSMS), developed in C#. It enables users to add custom menu items to the right-click context menu within the Object Explorer window.

These menu items can be configured to run either external T-SQL script files or inline T-SQL statements. Upon selection, the extension opens a new query window displaying the script. It also supports tag substitution within scripts and optional automatic execution, streamlining routine database tasks and enhancing productivity.

The project homepage is https://sqlmedic.com.

GitHub release (latest by date) GitHub license

Object Explorer

Install

Download the SSMSObjectExplorerMenu.vsix from the latest release.

Double click on the SSMSObjectExplorerMenu.vsix to run it and install the Object Explorer Menu extension.

Start VSIX extension install

Completed VSIX extension install

How to add menu items to the Object Explorer

Once the Object Explorer Menu extension is installed, new menu items can be added to the Object Explorer using either of the following two methods:

  1. Right-click on the node in the Object Explorer where you would like to add a context menu item and select New from the My Scripts menu. Object Explorer Add Menu Item
  2. Open the Options dialog window in SSMS Tools > Options > SQL Server Object Explorer > SSMS Object Explorer Menu and add new menu items to the collection. Menu items can also be rearranged or removed using the Options dialog. Options Dialog

Settings

The following settings are available for each menu item:

Text substitution

The following tags are replaced in tsql scripts and statements before execution:

Example 1

select
    '{SERVER}' as [server]
    , '{DATABASE}' as [database]
    , '{SCHEMA}' as [schema]
    , '{TABLE}' as [table]
    , '{VIEW}' as [view]	
    , '{STORED_PROCEDURE}' as [stored_procedure]
    , '{FUNCTION}' as [function]
    , '{JOB}' as [job]
    , '{YYYY-MM-DD}' as [date]
    , '{HH:mm:ss}' as [time]
    , '{YYYY-MM-DD HH:mm:ss}' as [datetime]
    , '{OBJECT}' as [object]

Example 2

select top 10
	*
from {DATABASE}.{SCHEMA}.{TABLE}

Compatibility

SQL Server Management Studio 21.x

This extension has been tested and used with SQL Server Management Studio 21.4.12.

You can download the latest version of SSMS for free from Microsoft.

Compatibility with other extensions are still being tested.

Extension Status
Redgate SQL Search Compatible
Redgate SQL Prompt Compatible

Please let us know what other extensions you use in SSMS. We’ll try our best to ensure compatibility.

SQL Server Management Studio 20.x

SSMS 20.x is no longer supported. The last version compatible with SSMS 20.x is version 2.3. Please consider upgrading to the latest version of SQL Server Management Studio.

SQL Server Management Studio 19.x

SSMS 19.x is no longer supported. The last version compatible with SSMS 19.x is version 1.7.2. Please consider upgrading to the latest version of SQL Server Management Studio.

Compiling the source code

Requirements for compiling the source code:

The Visual Studio extension development toolset can be installed via the Tools > Get Tools and Features menu inside Visual Studio.

FAQ

Where can I get the source code for the Object Explorer Menu extension?

You can find the full source code, documentation, and issue tracker on our GitHub repository: https://github.com/brink-daniel/ssms-object-explorer-menu

How can I contribute to the project?

If you encounter any issues, please report them on our GitHub Issues page. We also welcome community contributions. If you’d like to fix a bug or enhance a feature, feel free to submit a pull request. All contributions are reviewed, tested, and considered for inclusion in the project.

Why do you only support the latest version of SSMS?

The Object Explorer Menu extension is currently maintained by a single developer, with all work done voluntarily during personal time. To keep the project sustainable and maintainable, support is limited to the latest version of SQL Server Management Studio (SSMS).

Focusing on a single SSMS version reduces complexity, simplifies maintenance, and ensures a more stable experience for users. Given the productivity benefits this extension offers, our goal is to ensure its longevity—and keeping it simple is key to that goal.

Why was the Object Explorer Menu extension created?

As full-time SQL Server database developers, we spend countless hours in SQL Server Management Studio (SSMS)—often working with the tSQLt unit testing framework. While tSQLt is a powerful tool for database testing, it lacks a free and open-source UI for seamless interaction.

The Object Explorer Menu extension was born from a simple need: the ability to right-click a stored procedure in the Object Explorer and run all related unit tests with a single action. From that initial idea, the extension has evolved to support the execution of any inline T-SQL statement or script file directly from the right-click context menu in Object Explorer.

If you’re new to tSQLt, we recommend starting with their Quick Start Guide. You might also find our article on resolving the common “INSERT EXEC statement cannot be nested” issue helpful.

Why is the Object Explorer Menu extension free and open source?

We’re passionate about SQL Server Management Studio (SSMS)—and especially about SSMS extensions, which enhance productivity and make daily work easier.

We’d love to see more developers building great extensions for SSMS. Feel free to fork our code, experiment, and create something useful. If you build something cool, share it with the community!

Why use the Object Explorer Menu extension when other extensions also allow users to create custom menu items?

SSMS extensions should follow the Unix philosophy: do one thing and do it well. Many extensions become bloated with excessive features, which can lead to performance issues or interfere with the SSMS user experience.

The Object Explorer Menu extension is intentionally lightweight and focused. It adds only context-sensitive menu items to the Object Explorer, with no impact on SSMS startup time or overall UI performance. Each menu item supports tag substitution, enabling scripts to dynamically incorporate context-specific values such as the selected database, table, or stored procedure name.

How do I uninstall the Object Explorer Menu extension?

To uninstall the Object Explorer Menu extension, simply delete the SSMSObjectExplorerMenu folder located at: C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\Extensions.

After deleting the folder, restart SQL Server Management Studio to complete the uninstallation.

Credits

All development is done by Daniel Brink.

Information on how to access the Object Explorer and TreeView control was learnt by studying Nicholas Ross’s SSMS-Schema-Folders project.

Change Log

v3.2 (2025-07-31)

v3.1 (2025-06-10)

v3.0 (2025-06-08)

v2.3 (2024-12-23)

v2.2 (2024-11-12)

v2.1 (2024-03-23)

v2.0 (2024-03-21)

v1.7 (2023-08-01)

v1.6 (2023-07-25)

v1.5 (2023-07-23)

v1.4 (2023-07-22)

v1.3 (2023-07-15)

v1.2 (2023-07-11)

v1.1 (2023-07-07)

v1.0 (2023-07-04)