Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?




<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


.



Relevant Pages

  • Re: SBS 2003 IIS BASED SERVICES FAIL INTERMITTENTLY
    ... If I read your post correctly, you have a switch where the SBS ... Run DHCP server on your SBS, and set all client machine nics to dynamic. ... Once you have your nics configured, run the Connect to the Internet wizard, ... QUESTION1 - what is REFUSING CONNECTIONS? ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... So far everything is good and now I'm just monitoring my exchange. ... get the SMTP service to stop hanging in the first place. ... won't have dead connections. ... work for now until I put into production new server hardware with sbs 2003 ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... You really should go through the steps I posted and get the SMTP service to stop hanging in the first place. ... You'll be happier, you won't be clubbing your server every day with a kill script, and you won't have dead connections. ... You do *not* need to restart the server, ...
    (microsoft.public.windows.server.sbs)
  • Access 2007->SQL Server2005 "connection was forcibly closed",GNE 1
    ... I have a very big problem connecting an SQL ... changing number of clients using the SQL Server with this frontend at the ... connection pooling or if these connections are separated connections). ...
    (microsoft.public.sqlserver.connect)
  • Re: version/source control in datawarehouse project
    ... SSAS ans SSRS files under a source control system like visual source safe very easily. ... you can use configuration files to store your database connections. ... each folder will contains SQL scripts which modify the database and each developer as to apply the patches on his own environment. ... There is no server or desktop in our company. ...
    (microsoft.public.sqlserver.datawarehouse)