问题
I want to run a query in SQL Server Management Studio on several databases on different servers.
I am already connected to these servers in the object explorer.
Is there a quick way to change the connection of the current query tab to a different server without the need to login again (without using change connection) and without opening a new tab.
回答1:
Right-click in the query window and select Connection > Change Connection
:

That will bring up the standard connection dialog from which you can connect to whatever other server / instance you want ...
来源:https://stackoverflow.com/questions/26200632/how-can-i-change-the-connection-for-current-tab-in-microsoft-sql-server-manageme