none
Tds7.4 variation in ColMetaData structure RRS feed

  • Question

  • Hi guys, 

    I'm a little confused by the Tds spec for ColMetaData.

    I'm running the same sql query on a sql 2014 server and a 2016 server. both connections are using tds 7.4 (74000004).

    On the 2016 server there are an extra 2 bytes in between the usertype and flags sections. Looking at the documentation it looks like this should be the EkValueCount which the doc says was introduced in tds 7.4 but this does not exist in the 2014 packet.

    I'm confused as to how to tell whether the extra 2 bytes should be there or not given that both are tds74?

    Below are the relevant bytes from the packets:

    Sql 2014
    81 - COLMETADATA Token
    03 00 - Count
    00 00 00 00 - UserType
    08 00 - Flags
    38 - Int4Type
    09 - Column Name length
    49 00 6E 00 74 00 43 00 6F 00 6C 00 75 00 6D 00 6E 00 - Column Name

    //etc etc
    00 00 00 00 20 00 38 00 00 00 00 00 21 00 E7 00 01 09 04 D0 00 00 00 D1 01 00 00 00 78 15 00 00 0C 00 6D 00 61 00 73 00 74 00 65 00 72 00 FD 10 00 C1 00 01 00 00 00 00 00 00 00 


    Sql 2016
    81 - COLMETADATA Token
    03 00 - Count
    00 00 00 00 - UserType
    00 00 - WHAT IS THIS?!? ekvaluecount?
    08 00 - Flags
    38 - Int4Type
    09 - Column Name length
    49 00 6E 00 74 00 43 00 6F 00 6C 00 75 00 6D 00 6E 00 - Column Name

    //etc etc
    00 00 00 00 20 00 38 00 00 00 00 00 21 00 E7 00 01 09 04 D0 00 00 00 D1 01 00 00 00 78 15 00 00 0C 00 6D 00 61 00 73 00 74 00 65 00 72 00 FD 10 00 C1 00 01 00 00 00 00 00 00 00 

    Wednesday, April 19, 2017 10:16 AM

Answers

  • Hi Sreekanth 

    On further investigation it seems the variation is between sql versions and occurs if the login featureextacks include column encryption!

    So I'm all good now!

    thanks 

    Dan

    • Marked as answer by Dan A Turner Thursday, April 20, 2017 9:57 AM
    Thursday, April 20, 2017 9:57 AM

All replies

  • Hello Dan, I will be assisting you with your issue. Would you be able to contact me by sending email to dochelp at Microsoft dot com. Please attach a copy of the network trace for review.

    Regards,
    Sreekanth Nadendla
    Microsoft Windows Open specifications

    Wednesday, April 19, 2017 3:43 PM
    Moderator
  • Hi Sreekanth 

    On further investigation it seems the variation is between sql versions and occurs if the login featureextacks include column encryption!

    So I'm all good now!

    thanks 

    Dan

    • Marked as answer by Dan A Turner Thursday, April 20, 2017 9:57 AM
    Thursday, April 20, 2017 9:57 AM