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

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
Issue type :


Last Reviewed: March 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.