SQL Management Studio 不会在双击时打开脚本 [英] SQL Management Studio won't open scripts on double-click

查看:25
本文介绍了SQL Management Studio 不会在双击时打开脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯于在 SQL Server Management Studio 中双击 *.sql 脚本文件来打开它们.我最近升级到 Win7,现在当我双击脚本文件时,SSMS 以空环境打开.然后我可以使用 File/Open 或 File/Recent Files 打开我的脚本,但我更喜欢它像普通应用程序一样打开我双击的任何东西.

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 opens with an empty environment. I can then use File/Open or File/Recent Files to open my script, but I would much prefer for it to just open whatever I double-clicked on like a normal application would.

知道发生了什么吗?

顺便说一句,当我在 Visual Studio 的解决方案资源管理器中双击脚本时,它会像您期望的那样自动打开它.

BTW when I double-click a script from the Solution Explorer in Visual Studio, it does open it automatically just like you would expect.

推荐答案

我遇到了同样的问题.我不知道是什么原因造成的,但我通过快速注册表 hack 修复了它.

I had the same problem. I don't know what caused it, but I fixed it with a quick Registry hack.

  1. 转到 HKEY_CLASSES_ROOT\sqlwb.sql.9.0\Shell\Open\Command
  2. 编辑(默认)值
  3. 它应该包含如下内容:"c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe"/dde
  4. 在末尾添加"%1"
  5. 最终值将是这样的:"c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe"/dde "%1"

这篇关于SQL Management Studio 不会在双击时打开脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆