BUG: Multiple TDS Packets Cause 'Bad Token' Error for DBLIB

Last reviewed: May 5, 1997
Article ID: Q152128
The information in this article applies to:
  • Microsoft SQL Server, version 6.0

SYMPTOMS

Under certain situations, DB-Library (DBLIB) cannot handle multiple incoming tabular data stream (TDS) packets correctly, resulting in the following error:

   DB-Library: Possible network error. Bad token from SQL Server.
   Datastream processing out of sync.

This problem typically occurs under TCP/IP sockets when multiple TDS packets are bundled in a single network packet and read to the DBLIB in one single ConnectionRead. Also, a data row must be split between TDS packets for the problem to occur.

CAUSE

Typically, each TDS packet is sent to the client by a single network packet. However, under TCP/IP sockets, TCP may choose to bundle multiple TDS data packets into a single data segment to improve the network performance (this is also knowm as Nagle algorithm). This tends to create a situation where a data row is split across two consecutive ConnectionRead(), which causes the DBLIB to be unable to decode the TDS data correctly.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur Microsoft SQl Server version 6.5.

MORE INFORMATION

Because only TCP/IP sockets applications are subject to the coalescing of data packets, the problem seems to occur only when TCP/IP sockets are used for the SQL Server connections. The problem does not occur under either named pipes or IPX/SPX.


Additional query words: netlib Net-Library dbmssocn dbmssoc3
Keywords : kbbug6.00
Version : 6.0
Platform : Windows


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.