none
The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 2 (""): Data type 0x00 is unknown.

    Question

  • Hi,

    There was some questions, in this forum, related to TDS protocol stream error, but i read somewhere that each TDS stream error can be thrown due different problems, so for this reason i took the liberty of opening a new thread.

    Environment:

      Operating System: Windows Server 2008 R2
      Database: SQL Server 2008 (and SQL Server 2012. We are testing in both, to see the behavior)
      SQL Server Native Client: v.10 (and v.11 too)

    We are changing some database operations to use ODBC Array of Parameters.

    In a Stress Scenario, where we stress database with a lots of queries and dml operations, sometimes a very strange error appears, completely random, on functions that bind arrays.

    The error is the following: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 2 (""): Data type 0x00 is unknown.

    DML statements that are facing this error, are dmls statements that affect only numeric fields (so forget, NVarchar problems, LOBs, etc). DML commands, are affecting BingInt fields, integer fields, float fields and double fields.

    From what i can see on SQL Server Profiler (on successful dmls statements), SQL Native Client is creating a Store Procedure and invoke N (N = block size) times.

    Can you please provide some hints for what could be the problem? 

    Thanks on advance,


    Tuesday, October 15, 2013 11:12 AM

Answers

  • I've only encountered TDS problems in two cases:

    1. Network issues, where TCP/IP is failing to detect network errors, like defect NIC and switch ports.
    2. Faulty install of the client driver.

    When you're developing in C/C++ there is one more scenario, but I haven't seen it for years: Using the low-level ODBC libraries may result in a static binding against the wrong DLL on the systems under test.

    • Marked as answer by d.mourao Friday, October 18, 2013 2:42 PM
    Tuesday, October 15, 2013 12:09 PM

All replies

  • I've only encountered TDS problems in two cases:

    1. Network issues, where TCP/IP is failing to detect network errors, like defect NIC and switch ports.
    2. Faulty install of the client driver.

    When you're developing in C/C++ there is one more scenario, but I haven't seen it for years: Using the low-level ODBC libraries may result in a static binding against the wrong DLL on the systems under test.

    • Marked as answer by d.mourao Friday, October 18, 2013 2:42 PM
    Tuesday, October 15, 2013 12:09 PM
  • Thanks for the answer Stefan,

    The only thing that has confusing me is that, why the tds protocol error appears only on functions that are using arrays as binding values.

    The obvious answer is, because, in case of a DML statement, this function is sending more data to server (generally), than other operations (that are single value bind).
    I read enough to understand that TDS protocol is an application layer (like HTTP) over TCP/IP layer, and ODBC client wraps the request (row data + other stuff, like metadata) on TDS packets (each packet has a default size (4KB) and we can change it, but is not recommended). And i can imagine that, for operations that bind arrays, more packets are needed for sending all data to Server.

    So, if there has a network problem, can some of this packets arrive out-of-order or lost, and SQL Server do not know how to finalize the request?

    I will confirm the behavior, executing the same scenario in another network, to confirm that this error appears due network issues.

    Tuesday, October 15, 2013 4:30 PM
  • Hi,

    We execute the same scenario in another network and using only SQL Server 2012 and SQL Server Native Client 11.0, and the error disappears (until now)

    I believe that, the bug is in SQL Server 2008, because we guarantee that the client is compatible with server. I don't know if there has a hotfix for this, for 2008, but i cannot find it.

    A lesson that i learn from this, is that, we should check if client version are compatible with server, because different versions can mean different versions of the TDS protocol.

    Thanks,


    • Edited by d.mourao Friday, October 18, 2013 3:05 PM
    Friday, October 18, 2013 2:52 PM