Blog Post

SSMS "Connect to Database Engine" Prompt Behavior When Dragging And Dropping Files

,

A minor annoyance of mine for a long time has been how SSMS will sometimes prompt you to connect to a server and sometimes just connect automatically when a file (or files) gets dragged into the window. Thanks to an "aha!" moment with a coworker I've finally figured out why.

A connection is automatically made when SSMS is run for the first time and a server is highlighted in Registered Servers or Object Explorer. The connection is made to the server highlighted in the most recently viewed panel. If no server is highlighted in either panel and multiple files are dragged into the window SSMS will prompt you to connect for the first file and all other files will open with a connection to the same server. However, once you open a new query or a file using the File\Open dialog SSMS will no longer automatically connect when files are dragged into the window and you will always receive the dialog prompting you for server information.

I know, this sounds like a trivial tidbit of information, but imagine you need to open a bunch of scripts to run. Now you know how to avoid the frustration of having to deal with a new dialog box for every single file. Enjoy!

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating