Shortcut: Change connection in SQL Server Management Studio
I commonly run into a few connection-related scenarios:
- I’m working on a large query and need to run it against several servers, not concurrently, but one after the other.
- I’ve just made a database connection, and got my query ready, only to discover that I’ve connected to the wrong server.
Either way, what I’ve seen people do in these scenarios is to:
- Select all the text in the current query
- Copy it
- Open a new query window
- Paste the code
That’s all good but SQL Server Management Studio (SSMS) has had a simpler way of doing this for quite a while.
2018-08-23