SQL Server 2005 - Open SQL file with Query Analyzer behavior

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cryogeneric
    New Member
    • Jan 2008
    • 15

    SQL Server 2005 - Open SQL file with Query Analyzer behavior

    Hello!

    My company recently upgraded to SQL Server 2005 and I'm still getting used to the new interface. One thing I've noticed:

    When I'm connected to a specific database and I want to run a script, I click New Query, Open File then select the script. SQL Server 2005 brings up the "Connect to Database Engine" dialog again and the resets the database to master.

    This is a bit annoying, especially since Query Analyzer would allow me to open a new query window then open a script into it without resetting everything.

    Can anyone shed some light on how I might alter this behavior? Is there something in the options, perhaps?

    Thanks a million!!
  • confusedfusion
    New Member
    • Mar 2009
    • 15

    #2
    I started saving my query with

    USE DATABASENAME

    SELECT X
    FROM X

    This may not be the answer you are looking for but it saved me a couple of clicks

    Comment

    Working...