SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous — can I control this?
- From: alex_wh@xxxxxxx
- Date: Wed, 13 Aug 2008 02:54:42 -0700 (PDT)
So the problem.
Server logic uses its own implementation of secured access to data, so
login and password used for ADO Connection object to its success
connectiong to the server (via TCP/IP).
Later user logins via customized server login procedure and server
stores user ID with SET CONTEXT_INFO feature of MS SQL server.
So any server procedures that wants to control user access, reads
"context_info" field of the "sysprocesses" system server table.
The need of using of CONTEXT_INFO feature is so: there is no need to
pass user id into every call of the protected server procedure. It is
fine (security, traffic, etc.)
But on the client side, when application tryes to perform some
activity on the background using Command object with adAsyncExecute
flag, if Connection object is busy (executing or fetching), ADO
internally... creates additional TCP connection to the SQL server, and
performs nedded operation (I can see this with netstat utility). But
on the server side @@SPID is other (this is another session for SQL
server!), and context_info occures empty.
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?
Thank you all for the answers.
.
- Follow-Ups:
- Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- From: Ralph
- Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- From: Bob Barrows [MVP]
- Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Prev by Date: ADO2.8 XML
- Next by Date: Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Previous by thread: ADO2.8 XML
- Next by thread: Re: SQLOLEDB provider internally creates multiple connections to SQL server when commands executed asynchronous - can I control this?
- Index(es):
Relevant Pages
|