SQL Management Studio won't open scripts on double-click

前端 未结 8 1102
梦毁少年i
梦毁少年i 2020-12-09 16:44

I\'m used to double-clicking *.sql script files to open them in SQL Server Management Studio. I recently upgraded to Win7, and now when I double-click a script file, SSMS op

8条回答
  •  不思量自难忘°
    2020-12-09 17:16

    I tried all the ideas above (registry entries, etc.) - no luck. What ended up fixing it for me was this:

    1. close all SSMS instances.
    2. right click on a .sql file and select "Open With..." > "Choose Default Program"
    3. Select Notepad
    4. Double click on the file - it should open in notepad.
    5. close notepad.
    6. right click the .sql file again and select "Open With..." > "Choose Default Program" 
    7. Select "Sql Management Studio" again.
    8. Click the .sql file it should open SSMS
    9. Subsequent .sql files should open in the same instance.
    

    Hope this helps :)

提交回复
热议问题