When you change connection, SSMS should try to use the same database.
A not uncommon is that you are in database A on server A. Then you right-click and select Change Connection to a server B, and at least my unconcious assumption is that I will end up to database A on server B as well. But that does not happen, instead I am in my default database on that server, typically master.
Of course, it is far from certain that there is a database A on server B, but if A = tempdb or msdb it will. And you could of course have the same database name on different servers for other reasons: development test and production production for instance.
I found an older suggestion of the same nature in was suggested I could use the Connection Properties tab of the logon screen, but this does not cut it. I want a quick and seamless transition.
Upvotes: 9<=-=Jul 22 2009 8:47AM=-=>
Keeping the database context when switching servers makes sense. We’ll see if this is a straightforward thing to do.
We recently took a look at this feature request again and triaged it against several others and unfortunately, it did not meet the bar to be fixed. While we are closing this request as ’won’t fix’, we have taken note of this internally and we will try & incorporate this request when we revisit this functionality in a future release of SSMS.
Sanjay Nagamangalam, SQL Server Manageability