Sql Server Mgmt Studio: is there a way to get it to reuse windows?
This is more an annoyance than a real problem, but it would be great if someone had a trick to get it to work.
Let's say I have a .Sql file, MyScript.Sql. If I go to the file location in Windows Explorer and double click it, it opens SSMS. Good, that's what I want. However if I double click on that file again (or a different .sql file), I get a new instance of SSMS. So regardless of whether the file is already open I get a new instance of SSMS. If I open a different file, it doesn't reuse the first instance of SSMS, it opens a new one. Basically any .Sql file will open an entirely new instance of SSMS. This seems very dumb. Is it broken and gonna stay that way? Is there a solution?
I've tried the solution on social.msdn but it didn't work. Basically it looks like I can get re-use but only if I use VS to open the file. Which isn't great because there are lots of reasons I prefer to edit sql in SSMS.
I'd be open to writ开发者_如何学Going some sort of little intermediary app that takes in a file name, finds an existing ssms process and tells that app to open the file. If such a thing is even possible.
One instance of SSMS can't open two instances of the same file. Something to do with file handles I assume. So even your little intermediary app solution won't "fix" this. Why do you want to open the same file multiple times? If it's already open, how are you going to consolidate changes in both instances? If the goal is to save one copy as a different file, then just save the first file with a different name, then SSMS will treat the existing file as a "different" file. At least I think so; not at a PC where I can check.
精彩评论