http://www.sqlservercentral.com/blogs/kendalvandyke/2009/09/17/ssms-_2200_connect-to-database-engine_2200_-prompt-behavior-when-dragging-and-dropping-files/

Printed 2014/09/30 01:56PM

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

By Kendal Van Dyke, 2009/09/17

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!


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.