freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Attempt to initiate a new SQL Server operation withresults pending
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Attempt to initiate a new SQL Server operation withresults pending
- Date: Tue, 18 Oct 2005 11:58:07 -0400
> From: RCM2, Inc
> Sent: Tuesday, October 18, 2005 9:34 AM
>
> I am getting the "Attempt to initiate a new SQL Server operation
> with results pending" on an intermittent basis.
>
> We are running a product called WEBGUI (written in perl)(modPerl)
> under Apache on a Linux box. We use TDS to query a Microsoft SQL
> Server (2000) box. The above error occurs infrequently but enough
> to be a problem. My guess right now is that the application is
> not gracefully handling when the user cancels a request
Yours is a plausible explanation. Without seeing the source code and a
log of the session, it's hard to say for sure.
TDS is half-duplex protocol. The client libraries maintain state
information i.e., they keep track of whether the server is expecting
something from the client or vice versa.
The error message actually means -- and this is very important -- that
the server has not yet indicated it is finished replying. It might or
might not have more data to send, but the client has not yet seen the
DONE packet that tells it the server is ready for the next request.
With FreeTDS, the client must always check for pending results to every
query, even if none are anticipated. That's how the API is specified,
even though some versions of the vendors' libraries tolerate not
checking in some circumstances.
If the problem is related to cancellation, it's certainly possible that
the message could stem from the client not reading "en route" data.
After sending the cancel request, the client is obliged to read any rows
the server continues to send until the DONE packet arrives (which the
client library will represent as NO_MORE_RESULTS or similar).
http://www.primaat.com/webgui_sqlserver doesn't indicate which API
you're using. Could be tricky to track down the problem.
HTH.
--jkl
-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.
- Re: [freetds] Attempt to initiate a new SQL Server operation withresults pending, Lowden, James K, 10/18/2005
Archive powered by MHonArc 2.6.24.