Home All Groups Group Topic Archive Search About

How to close connection pool?

Author
3 Feb 2006 7:57 PM
pearsons_11114
Let me say preemptively I've read up on this and searched postings here and
haven't found an answer.

Connection pooling doesn't provide a way to close all connections in the
pool, short of exiting the process. This seems to me to be a designed-in
leak.  I can think of a few scenarios where this creates an administrative
problem, one of which I'm in.

Thanks.

Author
3 Feb 2006 8:31 PM
Miha Markic [MVP C#]
The feature is added in .net 2 for oracle and sqlserver.
Why is this (an administrative) problem for you?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
> Let me say preemptively I've read up on this and searched postings here
> and
> haven't found an answer.
>
> Connection pooling doesn't provide a way to close all connections in the
> pool, short of exiting the process. This seems to me to be a designed-in
> leak.  I can think of a few scenarios where this creates an administrative
> problem, one of which I'm in.
>
> Thanks.
Author
4 Feb 2006 8:59 PM
pearsons_11114
Just seems like a major design hiccup not to be able to control that. The
scenarios are unlimited. In my case, I want to perform a restore on a
database from the application. If that database has ever been accessed from
the application, then there will be effectively orphaned connections in the
pool preventing it until the user exits the application.  We dodged a bullet
in that the action is normally only performed when the application is first
started. However, some configuration information gets loaded from the DB
before that, so I need to set pooling to false for that action. So, I have
workarounds in my case, but still seems odd not to be able to control it.

Show quote
"Miha Markic [MVP C#]" wrote:

> The feature is added in .net 2 for oracle and sqlserver.
> Why is this (an administrative) problem for you?
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
> news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
> > Let me say preemptively I've read up on this and searched postings here
> > and
> > haven't found an answer.
> >
> > Connection pooling doesn't provide a way to close all connections in the
> > pool, short of exiting the process. This seems to me to be a designed-in
> > leak.  I can think of a few scenarios where this creates an administrative
> > problem, one of which I'm in.
> >
> > Thanks.
>
>
>
Author
4 Feb 2006 9:56 PM
Miha Markic [MVP C#]
I see. I guess what are you doing is the only thing you can do.
Perhaps you might consider going in single use mode (thus drop all exisitng
connections) before doing restore?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Show quote
"pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
news:96E7D38D-CEF8-4EED-AE7C-63B9FDC2A014@microsoft.com...
> Just seems like a major design hiccup not to be able to control that. The
> scenarios are unlimited. In my case, I want to perform a restore on a
> database from the application. If that database has ever been accessed
> from
> the application, then there will be effectively orphaned connections in
> the
> pool preventing it until the user exits the application.  We dodged a
> bullet
> in that the action is normally only performed when the application is
> first
> started. However, some configuration information gets loaded from the DB
> before that, so I need to set pooling to false for that action. So, I have
> workarounds in my case, but still seems odd not to be able to control it.
>
> "Miha Markic [MVP C#]" wrote:
>
>> The feature is added in .net 2 for oracle and sqlserver.
>> Why is this (an administrative) problem for you?
>>
>> --
>> Miha Markic [MVP C#]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>> "pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in
>> message
>> news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
>> > Let me say preemptively I've read up on this and searched postings here
>> > and
>> > haven't found an answer.
>> >
>> > Connection pooling doesn't provide a way to close all connections in
>> > the
>> > pool, short of exiting the process. This seems to me to be a
>> > designed-in
>> > leak.  I can think of a few scenarios where this creates an
>> > administrative
>> > problem, one of which I'm in.
>> >
>> > Thanks.
>>
>>
>>
Author
5 Feb 2006 12:18 AM
pearsons_11114
Duh. My rusty DBA skills exposed. That does the trick. Thanks!

Show quote
"Miha Markic [MVP C#]" wrote:

> I see. I guess what are you doing is the only thing you can do.
> Perhaps you might consider going in single use mode (thus drop all exisitng
> connections) before doing restore?
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
> news:96E7D38D-CEF8-4EED-AE7C-63B9FDC2A014@microsoft.com...
> > Just seems like a major design hiccup not to be able to control that. The
> > scenarios are unlimited. In my case, I want to perform a restore on a
> > database from the application. If that database has ever been accessed
> > from
> > the application, then there will be effectively orphaned connections in
> > the
> > pool preventing it until the user exits the application.  We dodged a
> > bullet
> > in that the action is normally only performed when the application is
> > first
> > started. However, some configuration information gets loaded from the DB
> > before that, so I need to set pooling to false for that action. So, I have
> > workarounds in my case, but still seems odd not to be able to control it.
> >
> > "Miha Markic [MVP C#]" wrote:
> >
> >> The feature is added in .net 2 for oracle and sqlserver.
> >> Why is this (an administrative) problem for you?
> >>
> >> --
> >> Miha Markic [MVP C#]
> >> RightHand .NET consulting & development www.rthand.com
> >> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> >>
> >> "pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in
> >> message
> >> news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
> >> > Let me say preemptively I've read up on this and searched postings here
> >> > and
> >> > haven't found an answer.
> >> >
> >> > Connection pooling doesn't provide a way to close all connections in
> >> > the
> >> > pool, short of exiting the process. This seems to me to be a
> >> > designed-in
> >> > leak.  I can think of a few scenarios where this creates an
> >> > administrative
> >> > problem, one of which I'm in.
> >> >
> >> > Thanks.
> >>
> >>
> >>
>
>
>
Author
5 Feb 2006 7:20 PM
William (Bill) Vaughn
Simply open connections with pooling disabled--or as suggested when
performing maintenance, use single-user mode.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

Show quote
"pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
news:96E7D38D-CEF8-4EED-AE7C-63B9FDC2A014@microsoft.com...
> Just seems like a major design hiccup not to be able to control that. The
> scenarios are unlimited. In my case, I want to perform a restore on a
> database from the application. If that database has ever been accessed
> from
> the application, then there will be effectively orphaned connections in
> the
> pool preventing it until the user exits the application.  We dodged a
> bullet
> in that the action is normally only performed when the application is
> first
> started. However, some configuration information gets loaded from the DB
> before that, so I need to set pooling to false for that action. So, I have
> workarounds in my case, but still seems odd not to be able to control it.
>
> "Miha Markic [MVP C#]" wrote:
>
>> The feature is added in .net 2 for oracle and sqlserver.
>> Why is this (an administrative) problem for you?
>>
>> --
>> Miha Markic [MVP C#]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>> "pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in
>> message
>> news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
>> > Let me say preemptively I've read up on this and searched postings here
>> > and
>> > haven't found an answer.
>> >
>> > Connection pooling doesn't provide a way to close all connections in
>> > the
>> > pool, short of exiting the process. This seems to me to be a
>> > designed-in
>> > leak.  I can think of a few scenarios where this creates an
>> > administrative
>> > problem, one of which I'm in.
>> >
>> > Thanks.
>>
>>
>>
Author
4 Feb 2006 5:59 PM
Sahil Malik [MVP C#]
As Miha said, you can clear a pool, or all pools on the SqlConnection object
in .NET 2.0.

In .NET 1.1, simply add a space to your connection string, and it will
recreate a pool and the old pool will eventually die.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________


Show quote
"pearsons_11114" <pearsons11***@discussions.microsoft.com> wrote in message
news:DBC5128D-FEDF-4B83-B580-9FE54E6F3A16@microsoft.com...
> Let me say preemptively I've read up on this and searched postings here
> and
> haven't found an answer.
>
> Connection pooling doesn't provide a way to close all connections in the
> pool, short of exiting the process. This seems to me to be a designed-in
> leak.  I can think of a few scenarios where this creates an administrative
> problem, one of which I'm in.
>
> Thanks.

AddThis Social Bookmark Button