Revision Summary Date Revision History Revision Class Comments 3/14/2008 0.1 Major Initial Availability. 6/20/2008 0.1.1 Editorial Changed language and formatting in the technical content. 7/25/2008 0.1.2 Editorial Changed language and formatting in the technical content. 8/29/2008 0.1.3 Editorial Changed language and formatting in the technical content. 10/24/2008 0.1.4 Editorial Changed language and formatting in the technical content. 12/5/2008 0.2 Minor Clarified the meaning of the technical content. 1/16/2009 0.3 Clarified the meaning of the technical content. 2/27/2009 0.4 Minor Clarified the meaning of the technical content. 4/10/2009 0.5 Minor Clarified the meaning of the technical content.
7/16/2010 8.0 Updated and revised the technical content. 8/27/2010 8.0 None No changes to the meaning, language, or formatting of the technical content. 10/8/2010 9.0 Major Updated and revised the technical content. 11/19/2010 9.0 None No changes to the meaning, language, or formatting of the technical content. 1/7/2011 9.1 Minor Clarified the meaning of the technical content. 2/11/2011 9.2 Minor Clarified the meaning of the technical content. 3/25/2011 9.3 Clarified the meaning of the technical content. 5/6/2011 9.4 Minor Clarified the meaning of the technical content. 6/17/2011 10.0 Major Updated and revised the technical content.
9/23/2011 11.0 Updated and revised the technical content. 12/16/2011 12.0 Major Updated and revised the technical content. 3/30/2012 12.1 Minor Clarified the meaning of the technical content. 7/12/2012 12.2 Minor Clarified the meaning of the technical content. 10/25/2012 12.2 None No changes to the meaning, language, or formatting of the technical content. 1/31/2013 13.0 Major Updated and revised the technical content. 8/8/2013 14.0 Major Updated and revised the technical content. 11/14/2013 15.0 Major Updated and revised the technical content. 2/13/2014 16.0 Major Updated and revised the technical content. 5/15/2014 17.0 Updated and revised the
Describes the data type, length, and name of column data that result from a SQL statement that generates totals. Token Stream Comments: The token value is 0x88. This token is used to tell the client the data type and length of the column data. It describes the format of the data found in an ALTROW data stream. The ALTMETADATA and corresponding ALTROW MUST be in the same result set. All ALTMETADATA data streams are grouped. A preceding COLMETADATA MUST before an ALTMETADATA token. There might be COLINFO and TABNAME streams between COLMETADATA and ALTMETADATA. Token Stream-Specific Rules: TokenType = BYTE Count = USHORT Id = USHORT ByCols = UCHAR Op = BYTE Operand = USHORT UserType = USHORT/ULONG; (changed to ULONG in TDS 7.2) fNullable = BIT fCaseSen = BIT usUpdateable = 2BIT ; 0 = ReadOnly ; 1 = ; 2 = Unused fIdentity = BIT fComputed = BIT ; (introduced in TDS 7.2) usReservedODBC = 2BIT fFixedLenCLRType = BIT ; (introduced in TDS 7.2) usReserved = 7BIT = fNullable fCaseSen usUpdateable fIdentity (FRESERVEDBIT / fComputed) usReservedODBC (FRESERVEDBIT / fFixedLenCLRType) usReserved NumParts = BYTE ; (introduced in TDS 7.2) PartName = US_VARCHAR ; (introduced in TDS 7.2) TableName = US_VARCHAR ; (removed in TDS 7.2) / (NumParts 1*PartName) ; (introduced in TDS 7.2) ColName = B_VARCHAR ColNum = USHORT ComputeData = Op Operand UserType Flags TYPE_INFO [TableName] ColName
5: Unicode data sorting id OLDVALUE = %x00 NEWVALUE = B_VARCHAR 6: Unicode data sorting comparison OLDVALUE = %x00 NEWVALUE = B_VARCHAR 7: SQL Collation OLDVALUE = B_VARBYTE NEWVALUE = B_VARBYTE 8: Transaction OLDVALUE = %x00 NEWVALUE = B_VARBYTE 9: Commit Transaction OLDVALUE = B_VARBYTE NEWVALUE = "0x00" 10: Rollback Transaction OLDVALUE = B_VARBYTE NEWVALUE = %x00 11: Enlist DTC Transaction OLDVALUE = B_VARBYTE NEWVALUE = %x00 12: Defect Transaction OLDVALUE = %x00 NEWVALUE = B_VARBYTE 13: Database Mirroring Partner OLDVALUE = %x00 PARTNER_NODE = B_VARCHAR NEWVALUE = PARTNER_NODE 15: Promote Transaction OLDVALUE = %x00 DTC_TOKEN = L_VARBYTE; NEWVALUE = DTC_TOKEN 16: Transaction Manager Address (not used) OLDVALUE = %x00 XACT_MANAGER_ADDRESS = B_VARBYTE NEWVALUE = XACT_MANAGER_ADDRESS 17: Transaction Ended OLDVALUE = B_VARBYTE NEWVALUE = %x00 18: Reset Completion Acknowledgement OLDVALUE = %x00 NEWVALUE = %x00 19: Sends back info of user instance for logins (login7) requesting so. OLDVALUE = %x00 NEWVALUE = B_VARCHAR 20: Routing OLDVALUE = %x00 %x00 Protocol = BYTE ProtocolProperty = USHORT
Index A Abstract data model client ( 112, 118) server ( 112, 126) ALL_HEADERS rule definition 33 33 34 15 19 156 178 27 C 15 185 Client abstract data model ( 112, 118) higher-layer triggered events ( 112, 120) initialization ( 112, 119) local events ( 117, 125) message processing ( 112, 121) 125 124 121 124 124 121 123 123 122 messages 19 18 17 18 18 18 18 19 125 overview ( 112, 118) sequencing ( 112, 121) 125 124 121 124 124 121 123 123 122 events ( 117, 125) timers ( 112, 119) 17 131 D Data - abstract client ( 112, 118) server ( 112, 126) Data stream 31 30 31 Data type definitions 35 35 38 42 Table Valued Parameter 43 45 43 47 41 36 41 27 E 21 Examples 156 134 136 143 146 133 133 153 155 150 151 157 156 158 F 15 state ( 125, 132) 26 G 8 Grammar definition - token description 50 data stream types 31 30 31 data type definitions 35 35 38 42 43
41 36 41 general rules 30 29 27 27 packet data stream headers 33 33 34 48 27 H triggered events client ( 112, 120) server ( 112, 127) I 179 179 21 11 127 Initialization client ( 112, 119) server ( 112, 127) 8 L Local events client ( 117, 125) server ( 117, 132) Logged In state ( 124, 131) 128 134 136 143 146 M Message processing client ( 112, 121) 125 124 121 124 124 121 123 123 122 server ( 112, 127) 131 132 127 131 128 127 130 128 Messages 17 27 17 24 76 21 19 syntax 17 27 17 24 76 50 21 19 17 N 10 O Other local events 125 132 178 12 P 24 Packet data - token stream definition 76 79 79 81 84 85 87 88 92 94 98 99 100 101 102 76 103 104 106 107 109 110 109 Packet data stream headers 33 33 34 24
76 Packet header message type - stream definition 51 50 166 171 53 64 68 161 71 72 176 73 159 Packets 21 24 packet header 24 21 24 24 23 22 24 21 179 14 133 14 180 Protocol Details 112 Q 33 R 10 11 10 14 18 153 155 S Security 179 179 179 179 178 124 124 121 123 123 122 Sequencing rules client ( 112, 121) 125 124 121 124 124 121 123 123 122 server ( 112, 127) 131 132 127 131 128 127 130 128 Server abstract data model ( 112, 126) higher-layer triggered events ( 112, 127) initialization ( 112, 127) local events ( 117, 132) message processing ( 112, 127) 131 132 127 131 128 127 130 128 messages 21 21 20 19 19 21 20 20 20 132 overview ( 112, 125) sequencing rules ( 112, 127) 131 132 127 131 128 127 130 128 events ( 117, 132) timers ( 112, 127) 19 130 178 150 151 18 18 157 156 16
Syntax client messages 19 18 17 18 18 18 18 19 grammar definition for description 50 30 35 27 27 33 48 17 packet data and tokenless data streams 27 24 25 178 25 packet data token stream definition 76 79 79 81 84 85 87 88 92 94 98 99 100 101 102 76 103 104 106 107 109 110 109 packet header message type - stream definition 51 50 166 171 53 64 68 161 71 72 176 73 159 159 packets 21 24 21 server messages 21 21 20 19 19 21 20 20 20 T Timer events client ( 117, 125) server ( 117, 132) Timers client ( 112, 119) server ( 112, 127) 128 Token data stream 25 token definition 26 25 27 26 26 data stream definition 76 79 79 81 84 85 87 88 92 94 98 99 100 101 102 76 103 104 106 107 109 110 109 Token data stream examples 178 178 178 Token description - grammar definition 50 data stream types 31 30 31