- To change the default entry, I used an application that displays the values โโof DDE (Dynamic Data Exchange). I personally used FileTypesMan .
Then I changed the command line for SSMS to:
"C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" /dde "%1"
The reason that a new instance always opens with editing, it seems that windows require a file to be associated with the program so that it can identify if an existing program is running and using that instance. This is apparently achieved using DDE. /dde indicates that DDE should be used on the command line. "% 1" passes the first line (ssms.exe path) to the DDE protocol for use as a parameter.
DDE message: stored in the SSMS 2008 R2 value that I found: Open("%1")
DDE application: change the application to ssms.11.0
Why ? That was the hard part. Where is it found? I could not find a tool to display the name of the DDE application. I found that when I looked at the registry editor, sqlwb.sql.9.0 is the entry for opening a new .sql file from 2008 R2. This corresponded to the registry entry for sqlwb.9.0 that the SSMS 2008 R2 record showed before I started making changes to FileTypesMan. I deleted .sql and found that HKEY_CLASSES_ROOT has an entry for ssms.sql.11.0 .
= Now the file association is installed on a new installation, and if SSMS.EXE is open, it should use the existing instance without additional work.
Tip . To speed up the boot, if you do not have one, you can use other command line options at boot time. Just go to the RUN dialog and type: ssms.exe -? list of launch options. I personally use -nosplash to prevent the screensaver from loading.
In addition, I use SSMSBoost , the largest tool with which I had to use SSMS daily (basic code encoding, fragment with cursor placement, setting preferred connections, full programming on the keyboard (along with the possibility of several steps at once with a shortcut, i.e. with basic macros.) Andre and his team are very sensitive to new ideas in their forum, another life of the developer.
Sheldonh
source share