If you right-click the server/database in Object Explorer and select New
Query, you will have the right context in the new query window. If you use
Ctrl+N or open a file, then where it connects will depend on the focus
context in Object Explorer. If you have no context in Object Explorer then
it will prompt (though I think Russell is correct that this behavior has
improved over time and with newer updates to the tools).
"Waldy" wrote in message
> Hi there,
> if I am connected to a server in object explorer and I then
> open a query window or open a file, is there any way that I can get
> Management Studio to use the current connection as in the Object Explorer
> instead of prompting me to log in again and connecting to the master
> database instead of the one that I am working on?
> >> Stay informed about: MS SQL Server Management Studio