Add the Available Databases drop-down list to the custom toolbar in SSMS

I create my own toolbar in SSMS. I would like to add the Available Databases drop-down list, which is part of the SQL Editor toolbar, to my own toolbar. But I can’t figure out how to add it. He is not on the list of teams.

+6
source share
2 answers

The only way I was able to do this (using SSMS 2016) is to play with the .vssettings file directly. First, I had to identify the GUID for the Available Databases command, removing it from the SQL Editor toolbar and exporting the settings. This added the <remove Cmd ...> entry to the settings file. Then I could use this GUID to add it to my custom toolbar as follows:

 <Category name="Environment_CommandBars" Category="{B9D9C123-B500-4202-B887-57C829CBD08F}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_CommandBars" PackageName="Visual Studio Environment Package"> <CommandBars Version="05072811"> <DefaultCustomizations/> <UserCustomizations> <add_group Group="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000202" GroupPri="40000001" Menu="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000602"/> <add_toolbar Menu="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000602" Name="Customer Toolbar" MenuType="toolbar"/> <modify_toolbar Menu="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000602" Name="Pleomax" Visibility="show" FullScreen="hide" Dock="top" Row="1" FloatRectangle="0,0,45,24" DockRectangle="1,0,45,24"/> <add Cmd="{52692960-56BC-4989-B5D3-94C47A513E8D}:00000004" CmdPri="40000001" Group="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000202" GroupPri="40000001" Menu="{8D3759E8-C5F6-4C93-B672-43B89D8479A5}:00000602"/> </UserCustomizations> </CommandBars> </Category> 

The key points for not changing are Cmd="{...}" and CmdPri="..." . The values ​​of Group , GroupPri and Menu should correspond to all those assigned when creating a custom toolbar (and export settings).

Then, when you import the modified settings file, it should have a Available Databases drop-down list on the client toolbar!

+3
source

I think the answer is "Reinstall SSMS", unfortunately.

0
source

Source: https://habr.com/ru/post/947910/


All Articles