Double-clicking .sql Files Opens New Instance of SSMS 20
Posted March 25, 2024
Reading time: 1 minute
I recently upgraded to SQL Server Management Studio 20.0. After doing so, any time I double-clicked on
a .sql
file, it opened a new instance of SSMS instead of opening the file in my existing, open intance. After
digging around for a bit, I finally found a registry hack that restores the appropriate behavior.
You can read about other potential solutions on the support thread at Microsoft Q&A, but this is what eventually restored the correct behavior for me:
In
HKEY_CLASSES_ROOT\.sql
, change the value fromsql_auto_file
tossms.sql.20.0
.
Depending on your installed version of SSMS, you may need to alter the version in the string.
After making this change, my .sql
file icons returned to normal, and double-clicking on .sql
files
once again opened the files in my current instance of SSMS.
Long live the registry.