2

After installing SQL Server Management Studio 2017 and uninstalling SSMS 2016, Windows 10 shows the "How do you want to open this .sql file" screen every time I try to open a sql file.

How do you want to open this .sql file

When I look at file type association setup, it doesn't show .sql extension:

Choose default apps by file type doesn't showing .sql extension

Is there any fix to this issue without manual registry manipulation and 3rd party utilities?

  • No, I didn't figure it out. I've got another machine so the problem is gone so far. =) tks btw – natenho Apr 1 '18 at 14:30
  • No worries, see this answer: superuser.com/questions/1112867/… if you want to try what I was referring to however you will need to point all that to .sql and ssms rather than py or whatever but this is the method at least that I believe will fix this issue if you run into it again if the repair feature from Programs and Features doesn't resolve. I also found this too: docs.microsoft.com/en-us/sql/relational-databases/scripting/… – Pimp Juice IT Apr 1 '18 at 14:36
1

In Management Studio:

  • Tools
  • Options
  • Text Editor
  • File extension
  • add .sql
  • OK
1

All of these answers are wrong. You have to repair SSMS. If you manually reassign .sql files, they will open with SSMS, but not in the proper way, which leads to multiple instances.

In my case repairing was only possibly by re-downloading the installer, as add/remove programs failed when I tried to repair it there.

-1

In SSMS I clicked on File, Open, File and all of the .sql files in the default location appeared. To test I simply clicked on one and it opened.

  • That is a work-around, but it does not restore the .sql file extensions and therefore does not answer the question. – music2myear Mar 28 '18 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.