Sunday, March 25, 2012

default database for opening a .sql file?

I am using SQL Server Management Studio. Whenever I open a .sql file, it
does 2 annoying things:
1) prompts me to connect, yet again.
2) sets the database drop down to master again.
The second one, in particular, is really annoying. Is there a way to change
the database that it connects to when I open a .sql file?
Note: setting the default database for the server worked for windows created
with "New Query" but not for opening .sql files.
Heh, 2 seconds after posting I stumble across it. When it prompts me to
connect, there is an Options button. I clicked it and on the Connection
Properties tab it had the same "connect to database" dropdown that I used to
set the default for new query windows. Now whenever I open a .sql file it
goes to the right database.
"Adam J. Schaff" <aschaff@.cascodev.com> wrote in message
news:%23dCE6D4IHHA.4928@.TK2MSFTNGP06.phx.gbl...
>I am using SQL Server Management Studio. Whenever I open a .sql file, it
>does 2 annoying things:
> 1) prompts me to connect, yet again.
> 2) sets the database drop down to master again.
> The second one, in particular, is really annoying. Is there a way to
> change the database that it connects to when I open a .sql file?
> Note: setting the default database for the server worked for windows
> created with "New Query" but not for opening .sql files.
>
|||>I am using SQL Server Management Studio. Whenever I open a .sql file, it
>does 2 annoying things:
> 1) prompts me to connect, yet again.
SQL Server 2005 Service Pack 2 will fix this problem. We just released a
December CTP that has this improvement and many more.
http://www.microsoft.com/downloads/details.aspx?FamilyID=d2da6579-d49c-4b25-8f8a-79d14145500d&DisplayLang=en
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
"Adam J. Schaff" <aschaff@.cascodev.com> wrote in message
news:%23dCE6D4IHHA.4928@.TK2MSFTNGP06.phx.gbl...
>I am using SQL Server Management Studio. Whenever I open a .sql file, it
>does 2 annoying things:
> 1) prompts me to connect, yet again.
> 2) sets the database drop down to master again.
> The second one, in particular, is really annoying. Is there a way to
> change the database that it connects to when I open a .sql file?
> Note: setting the default database for the server worked for windows
> created with "New Query" but not for opening .sql files.
>

No comments:

Post a Comment