我习惯双击*.sql脚本文件在SQL Server Management Studio中打开它们.我最近升级到Win7,现在当我双击一个脚本文件时,SSMS打开一个空的环境.然后,我可以使用文件/打开或文件/最近的文件来打开我的脚本,但我更喜欢它只是打开我像正常应用程序那样双击的任何内容.
有什么想法发生了什么?
顺便说一句,当我在Visual Studio中双击解决方案资源管理器中的脚本时,它会像您期望的那样自动打开它.
Jos*_*ger 22
我有同样的问题.我不知道是什么导致它,但我用快速注册表黑客修复它.
"c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde"%1"到最后"c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe" /dde "%1"在我的情况下,需要修复的注册表项是HKEY_CLASSES_ROOT\.sql
(默认)已更改为sql_auto_file ...并且需要为ssms.sql.12.0(对于SSMS 2014)...大概是SSMS 2012的ssms.sql.11.0.
在大多数其他解决方案倾向于引用的HKEY_CLASSES_ROOT\ssms.sql.12.0路径中的所有其他内容都很好.

我尝试了上面的所有想法(注册表条目等),但不走运。最终为我修复的是:
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.
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助 :)
| 归档时间: |
|
| 查看次数: |
21654 次 |
| 最近记录: |