restore tabs after reopening SQL Server Management Studio

蹲街弑〆低调 提交于 2019-12-10 12:29:46

问题


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.

Any third party tools that do something like this, perhaps? Thanks for the advice.

-Larry


回答1:


  • SSMS Tools pack (free up to SSMS 2008, for SSMS 2012 as paid upgrade)
  • Red Gate Tab Magic (no more standalone)
  • SQL Prompt



回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/5733624/restore-tabs-after-reopening-sql-server-management-studio

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!