Results 1 to 9 of 9

Thread: "Connect to Database Engine" prompt

  1. #1
    Join Date
    Oct 2003
    Posts
    14

    "Connect to Database Engine" prompt

    Whenever I open a saved query in SQL Server 2005, I get the "Connect to Database Engine" prompt even if I have an active database connection open. I had SQL Server 2005 installed on another computer and did not get this prompt every time (I just replaced that computer).

    Any way to configure SQL Server Management Studio to not prompt me every time and connect to the last active database by default?

  2. #2
    Join Date
    Jan 2010
    Posts
    37
    As far as I know, there is no way for SQL to not prompt every time a saved query is opened, but it may be possible in one of the options in SSMS.

    SSMS has a different connection for every query you have, and when you opened a saved query if it is not a part of a project where the connection is saved then you will get a prompt every time when you open it wanting to know what instance you want to run the query against.

  3. #3
    Join Date
    Oct 2003
    Posts
    14
    Thanks, I appreciate the feedback. I've scoured SSMS for an option to allow it and haven't found one. It has to be possible though because it worked that way on my old computer. Unfortunately I don't have it anymore so I can't compare settings. I'll keep digging.

  4. #4
    Join Date
    Feb 2010
    Posts
    2
    Quote Originally Posted by joshk View Post
    Whenever I open a saved query in SQL Server 2005, I get the "Connect to Database Engine" prompt even if I have an active database connection open. I had SQL Server 2005 installed on another computer and did not get this prompt every time (I just replaced that computer).

    Any way to configure SQL Server Management Studio to not prompt me every time and connect to the last active database by default?
    Not sure if this is what you want, but I've found the following works for me
    - first connect to the database in the Object Explorer
    - then any SQL files you open use that database connection

  5. #5
    Join Date
    Oct 2003
    Posts
    14
    No, I still get the prompt even if I do that first.

  6. #6
    Join Date
    Feb 2010
    Posts
    2
    Weird

    I'm pretty certain I've not made any changes in SSMS so I thought the behaviour was "standard", so why I don't get the prompt ?

  7. #7
    Join Date
    Oct 2003
    Posts
    14
    And I didn't get the prompt on my other computer, which means it has to be a config issue of some kind ---- but what?

  8. #8
    Join Date
    Jan 2010
    Posts
    37
    Well, you could always save your queries in projects. That should save the connection for that query as well.

  9. #9
    Join Date
    Feb 2006
    Posts
    4
    My experience is that you will always get prompt unless you have a default database specified for the server. I don't know where that is set, but I do know that I have different settings depending on which server I am on. Production servers here do not retain login information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •