New query in project sometimes prompts for connection--other times not

  • I'm using SSMS 2008 R2 connected to the same version database on two different machines. On both machines, I did this:

    1. Connected to the server

    2. No query windows are open

    3. Created a project

    4. Right-clicked on the Queries folder in Solution Explorer and selected "New Query."

    On one machine, I am immediately prompted for a connection. On the other, I am not. How is this controlled? How can I change one machine to behave like the other in this respect?

    Thanks!

  • You are typically connected in a new project with the connection selected in server connection. You say, you connect to the server. Is this connection still selected in Object Explorer when you open a new query in the Solution Explorer? Does this connection have access to SQL Server? Are logins set up appropriatly on both servers?

    Yelena

    Regards,Yelena Varsha

  • Thanks for the reply, Yelena. The answer is 'yes' to all your questions. There is an active connection to the server in both cases. Both machines are imaged identically, so the servers are identical on both machines.

  • Then compare <projectname>.ssmssqlproj files. You can open them in Notepad. Each file is located where you created your project, you can check that in the project properties. Also check SSMSEmptySqlProject.ssmssqlproj file, should be a couple of them, one is under SQL Server locaton, one is under Visual Studio location, search your server.

    Yelena

    Regards,Yelena Varsha

  • What do you mean? Compare them against what? What am I looking for?

    Oh, I think you are suggesting that I compare the project flies for any differences between them. OK. I'll do that. Thanks.

  • Compare to each other, on one server compare to one on another server... Maybe something there. Look at the example at the bottom of this article:

    http://social.technet.microsoft.com/Forums/sqlserver/en-US/7e6e7320-1122-41b4-af47-5059936814c4/default-path-for-save-a-query

    .ssmssqlproj files can contain connection parameters and how to specify connections for queries.

    Regards,Yelena Varsha

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply