Connection keeps Changing When Switching Between Queries

  • I hope someone can help with this.

    When I have several queries opened in SSMS the connection keeps changing back to an earlier database.

    I have a Solution open and will use a query from this. Then when I create a new etc. the connection is back to the earlier version database???

    I even use a "USE" statement in my query to use the current database.

    This is very frustrating as I have to keep watching the status area for which database I am actually running against.

  • What do you mean "changing back to an earlier database"?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • The new Query button will open up with the connection information for whatever Server/Database is currently selected in the Object Explorer.

    If Object Explorer is not visible the connection info is copied from whatever SSMS window is currently on top/visible.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

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