重新打开 SQL Server Management Studio 后恢复选项卡

发布于 2024-11-02 16:27:46 字数 148 浏览 1 评论 0原文

我不认为有一种方法可以模拟 FireFox 类型的设置,即如果我关闭 SQL Server Management Studio (2008),我打开的选项卡在重新启动时会再次出现?我知道我可以将各个窗口保存到 .sql 文件中,但想知道是否有办法让这些选项卡自行重新打开其中的文本。

I don't suppose there's a way to emulate a FireFox-type of setup, whereby if I close SQL Server Management Studio (2008) my open tabs will be there again when I restart? I know I can save the individual windows into a .sql file but was wondering if there was a way for those tabs to reopen with the text in them on their own.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

橙幽之幻 2024-11-09 16:27:46

有一种内置方法可以完成大部分此操作,但它不会打开关闭 SSMS 时存在的任何随机选项卡。

您可以在 SSMS 中创建解决方案并使用任何 SQL 脚本集保存它。这与 Visual Studio 的工作原理非常相似。您甚至可以保存连接(服务器+登录信息)。文件菜单包含“关闭解决方案”以及“打开项目/解决方案”和“最近的项目和解决方案”选项。

因此,如果您创建一个解决方案,添加一些查询(即 .sql 脚本),然后通过“文件”菜单或仅关闭 SSMS 关闭该解决方案,当您再次打开该解决方案时,它将恢复您在解决方案/SSMS 关闭的时间。

我刚刚在 SSMS 2012 中测试了这个,尽管它可能早在 SQL Server 2005 就开始了。即使不是在 2005 年,这个功能也绝对应该在 2008 / 2008 R2 中出现。

并不完全像 FireFox / Chrome 功能那样开放,因为它需要带有定义的 .sql 文件的定义解决方案,但绝对接近。

There is a built-in way to do mostly this, but it is not going to open any random tabs that were there when you closed SSMS.

You can create a Solution in SSMS and save it with any set of SQL scripts. This works much like Visual Studio. You can even save connections (server + login info). The FILE menu has options to "Close Solution" as well as "Open Project/Solution" and "Recent Projects and Solutions".

So, if you create a Solution, add some Queries (i.e. .sql scripts), and then close the solution either via the FILE menu or just closing SSMS, when you open that Solution again it will restore the tabs that you had open at the time the Solution / SSMS was closed.

I just tested this in SSMS 2012, though it might have started as far back as SQL Server 2005. Even if not in 2005, this feature should definitely be in 2008 / 2008 R2.

Not exactly as open-ended as the FireFox / Chrome feature as it requires a defined Solution with defined .sql files, but definitely close.

过潦 2024-11-09 16:27:46

在 VMWare 中运行 Studio 并在会话之间简单地暂停 VMWare 怎么样?

出于开发目的,我使用仅运行 SQL Server 和 Mangement Studio 实例的 VMWare。也许这对于数据库开发来说有点大材小用,但它有助于测试数据库与网络环境的集成。

How about running the Studio inside a VMWare and simply suspend the VMWare between sessions?

For my development purposes I use a VMWare that only runs an instance of SQL Server and the Mangement Studio. Maybe it's overkill for DB development but it helps in testing the integration of the database into a networked environment.

暮倦 2024-11-09 16:27:46

Redgates SQLPrompt 正是这样做的。当您关闭会话(故意或会话崩溃)时,重新打开 SSMS 时,所有先前打开的选项卡将自动启动。如果您选择不自动启动这些选项卡,仍然可以通过“选项卡历史记录”选项使用它们。

该工具确实要花钱,但附带的智能感知和片段功能使其物有所值。

Redgates SQLPrompt does exactly this. When you close you session (on purpose or if the session crashes), all previously open tabs will launch automatically when SSMS is reopened. If you choose not to automatically launch these tabs, they’re still available via the Tab History option.

The tool does cost money but the intellisense and Snippets feature that accompany it makes it value for money.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文