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.
Adding own parameters to the menu items are also supported. Every menu item can have its own list of them. Their values can be enetered in a dialog before the T-SQL script’s execution.
The project homepage is https://sqlmedic.com.

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


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:
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.

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.

The following settings are available for each menu item:
The following tags are replaced in T-SQL scripts and statements before execution:
{SERVER}{DATABASE}{SCHEMA}{TABLE}{VIEW}{STORED_PROCEDURE}{FUNCTION}{JOB}{YYYY-MM-DD}{HH:mm:ss}{YYYY-MM-DD HH:mm:ss}{OBJECT}Every menu item can have a set of additional parameters if needed. They can be defined at the time when the menu item is added and can be edited later in the Options grid. Each of them must have a unique name and a (data) type.
When adding a parameter, do not wrap its name in curly braces. It will be wrapped automatically when looking for the parameter during text substitution in the T-SQL script.
MY_CUSTOM_PARAM.{MY_CUSTOM_PARAM}.The following rules are applied on parameter names:
{SERVER}, {DATABASE}, etc.) cannot be used as a custom parameter name.A custom parameter can have one of the below types:
The list of options can’t have duplicate elements.
You can provide any string as a datetime2 or datetimeoffset argument which can be parsed to the .NET types DateTime and DateTimeOffset.
These user-defined parameters are substituted the same way like the tags of the execution context.
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]
select top 10
*
from {DATABASE}.{SCHEMA}.{TABLE}
-- {OBJECT_TYPE} and {NAME_FILTER_EXP} are user-defined (custom) parameters
select * from sys.objects
where type_desc = '{OBJECT_TYPE}' and name like '{NAME_FILTER_EXP}';
This extension has been tested and used with SQL Server Management Studio 22.3.
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.
SSMS 21.x is no longer supported. The last version compatible with SSMS 21.x is version 3.2.2. Please consider upgrading to the latest version of SQL Server Management Studio.
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.
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.
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.
You can find the full source code, documentation, and issue tracker on our GitHub repository: https://github.com/brink-daniel/ssms-object-explorer-menu
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.
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.
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.
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!
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.
To uninstall the Object Explorer Menu extension, simply delete the SSMSObjectExplorerMenu folder located at: C:\Program Files\Microsoft SQL Server Management Studio 22\Release\Common7\IDE\Extensions.
After deleting the folder, restart SQL Server Management Studio to complete the uninstallation.
All development is done by Daniel Brink and Viktor Mészáros.
Information on how to access the Object Explorer and TreeView control was learnt by studying Nicholas Ross’s SSMS-Schema-Folders project.
{OBJECT} tag{YYYY-MM-DD}, {HH:mm:ss} and {YYYY-MM-DD HH:mm:ss} tags{TABLE} tag to be populated with the view name when using the {VIEW} tag{VIEW} tag{FUNCTION} tag