Home All Groups Group Topic Archive Search About

Management Studio: DB Context: Script Opens a new connection - How do I get script to reuse the conn

Author
6 Dec 2005 6:47 PM
Chuck Hawkins
I just partially discovered how to work around something that was driving me
crazy.

When I was opening up a script to apply to a database, the Query Windows was
always opening a new connection to the Master Database. I want Query
Anazlyzer-like functionality where the script is opened in the same
connection to the same database, causing me not to have 10 succesive windows
open when I open and quickly run 10 successive scripts. Instead what was
happening was each script opens a new connection to the master DB.

I discovered that if I change the database one time in the Connection
Properties tab of the Connect to Database Engine window, exposed after
clicking the Options>> button successive windows will at least open up in
the same database context and I don't have to keep switching from Master.

Now, how do I get Management Studio to re-use the same connection for
succesive scripts?

Thanks,

Chuck Hawkins

Author
8 Dec 2005 7:23 PM
Joe
I started a thread on this same issue on 11/12/2005 - titled 'Management
Studio Automation.'  You can check that out for some ideas on how to deal
with this.

It is the one deal-breaker that is keeping me from moving to Management
Studio.  There were a bunch of workarounds posted, but all of them were just
that - work arounds.




Show quote
"Chuck Hawkins" <charles.hawkins@NOSPAMjenzabar.net> wrote in message
news:O$SKFWp%23FHA.1256@TK2MSFTNGP15.phx.gbl...
>I just partially discovered how to work around something that was driving
>me
> crazy.
>
> When I was opening up a script to apply to a database, the Query Windows
> was
> always opening a new connection to the Master Database. I want Query
> Anazlyzer-like functionality where the script is opened in the same
> connection to the same database, causing me not to have 10 succesive
> windows
> open when I open and quickly run 10 successive scripts. Instead what was
> happening was each script opens a new connection to the master DB.
>
> I discovered that if I change the database one time in the Connection
> Properties tab of the Connect to Database Engine window, exposed after
> clicking the Options>> button successive windows will at least open up in
> the same database context and I don't have to keep switching from Master.
>
> Now, how do I get Management Studio to re-use the same connection for
> succesive scripts?
>
> Thanks,
>
> Chuck Hawkins
>
>
>
Author
9 Dec 2005 9:10 AM
Wesley B
Same here :(
And the workarounds posted are not really an alternative for me. 

Show quote
"Joe" wrote:

> I started a thread on this same issue on 11/12/2005 - titled 'Management
> Studio Automation.'  You can check that out for some ideas on how to deal
> with this.
>
> It is the one deal-breaker that is keeping me from moving to Management
> Studio.  There were a bunch of workarounds posted, but all of them were just
> that - work arounds.
>
>
>
>
> "Chuck Hawkins" <charles.hawkins@NOSPAMjenzabar.net> wrote in message
> news:O$SKFWp%23FHA.1256@TK2MSFTNGP15.phx.gbl...
> >I just partially discovered how to work around something that was driving
> >me
> > crazy.
> >
> > When I was opening up a script to apply to a database, the Query Windows
> > was
> > always opening a new connection to the Master Database. I want Query
> > Anazlyzer-like functionality where the script is opened in the same
> > connection to the same database, causing me not to have 10 succesive
> > windows
> > open when I open and quickly run 10 successive scripts. Instead what was
> > happening was each script opens a new connection to the master DB.
> >
> > I discovered that if I change the database one time in the Connection
> > Properties tab of the Connect to Database Engine window, exposed after
> > clicking the Options>> button successive windows will at least open up in
> > the same database context and I don't have to keep switching from Master.
> >
> > Now, how do I get Management Studio to re-use the same connection for
> > succesive scripts?
> >
> > Thanks,
> >
> > Chuck Hawkins
> >
> >
> >
>
>
>
Author
13 Dec 2005 4:17 PM
Joe
There is a product suggestion logged for this already.  I suggest going
there and voting for it and maybe it will get some attention.

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=e242a31c-d3d1-45e7-a25e-9b5323294581

and

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=8098e484-1019-4331-aaba-1d11828d887a




Show quote
"Chuck Hawkins" <charles.hawkins@NOSPAMjenzabar.net> wrote in message
news:O$SKFWp%23FHA.1256@TK2MSFTNGP15.phx.gbl...
>I just partially discovered how to work around something that was driving
>me
> crazy.
>
> When I was opening up a script to apply to a database, the Query Windows
> was
> always opening a new connection to the Master Database. I want Query
> Anazlyzer-like functionality where the script is opened in the same
> connection to the same database, causing me not to have 10 succesive
> windows
> open when I open and quickly run 10 successive scripts. Instead what was
> happening was each script opens a new connection to the master DB.
>
> I discovered that if I change the database one time in the Connection
> Properties tab of the Connect to Database Engine window, exposed after
> clicking the Options>> button successive windows will at least open up in
> the same database context and I don't have to keep switching from Master.
>
> Now, how do I get Management Studio to re-use the same connection for
> succesive scripts?
>
> Thanks,
>
> Chuck Hawkins
>
>
>

AddThis Social Bookmark Button