Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 13 Aug 2008 11:19:03 -0500
<alex_wh@xxxxxxx> wrote in message
news:8792e6ac-873b-490a-aaaf-58829189e980@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<snipped>
Moreover, ADO drops unused connection "older-first", and other command
objects in application accorded to execute normal, synchronous
commands, becoms out of session context info on the server side.
Is there any way to control this automatic creation of connections to
the SQL server?
You have discovered two separate mechanisms - ADO's default Connection
Pooling and SQLServers propensity to create additional connections as it
sees fit. You can turn off the former, but you are essentially out-of-luck
on the latter. Some are inherent behavior, some can be re-configured, and it
depends a great deal on the type of query.
Several years ago (I forget why) we decided to try and micro-manage
connections. It soon drifted into a study of madness. <g>
It is kind of like the old determistic basic I/O services. We used to be
able to drop down to raw low-level access routines and control it all - but
now days there are 6 to 12 levels of indirection between here and there -
even with a "low-level" call, it just isn't possible - a cat always manages
to escape the herd sooner or later.
My advice is back-up and asks yourself what is it I really need to do here
and then re-organize the higher-level services to produce that behavior. If
you find yourself tracking and trying to control "THE connection" - you have
gone too far. <g>
-ralph
.
- References:
- Prev by Date: Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Next by Date: Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Previous by thread: Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Index(es):
Relevant Pages
|