Solution 1:

In Management Studio:

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

Solution 2:

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.