This is not a new problem and there are several solutions floating around on Internet.
When you double click on a
.sql file, a new instance of SSMS is opened. I did not have this problem until new SQL Server Management Studio (SSMS 17.9.1) was installed.
What I tried
- This page lists several solutions suggesting registry changes and file associations, and reinstalling SSMS. None worked.
- This one has almost the same as the previous link. (SO is so much better than those forums.)
- Registry changes are shown here with excellent screenshots. I added
"%1"but that did not make any difference.
- The suggestion mentioned on SO did not work either.
- On DBA, it is mostly talking about raised permissions, which is not the case with my situation.
Yes, I know about these workarounds:
- Ctrl + O
.sqlfiles to SSMS
I am not looking for workarounds.
Even with the new SSMS 17.9.1 (build: 14.0.17289.0), I am still pointing to SQL Server 2016 (13.0.5233.0). Previously, I was using SSMS June 2016 (build: 13.0.15000.23) with the same SQL Server (13.0.5233.0).
Because of permission, I am not running any application as administrator.
SQL Server versions are listed here.
SQL Server Management Studio versions are listed here.