Revision Summary Date Revision History Revision Comments 3/14/2008 0.1 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 Minor 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 Major 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 Updated and revised the technical content.
9/23/2011 11.0 Major 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 Updated and revised the technical content. 11/14/2013 15.0 Major Updated and revised the technical content. 2/13/2014 16.0 Updated and revised the technical content. 5/15/2014 17.0 Updated and revised the
technical content. 6/30/2015 18.0 Major Significantly changed the technical content. 10/16/2015 19.0 Significantly changed the technical content. 5/10/2016 19.0 None No changes to the meaning, language, or formatting of the technical content. 7/14/2016 19.0 None No changes to the meaning, language, or formatting of the technical content. 3/16/2017 20.0 Major Significantly changed the technical content. 6/1/2017 20.0 None No changes to the meaning, language, or formatting of the technical content. 8/16/2017 21.0 Major Significantly changed the technical content. 9/15/2017 22.0 Major Significantly changed the technical content.
transaction, according to the definition at the end of this table. If fBeginXact is 0, then ISOLATION_LEVEL SHOULD NOT be present. Specifying ISOLATION_LEVEL allows the isolation level to remain in effect for the session, once the transaction ends. If fBeginXact is 0, BEGIN_XACT_NAME SHOULD NOT be present. If fBeginXact is 1, BEGIN_XACT_NAME can be nonempty. If fBeginXact is 1, a new transaction MUST be started. If BEGIN_XACT_NAME is nonempty, the new transaction MUST be given the specified name. See the definition for isolation level at the end of this table. For RequestType TM_ROLLBACK_XACT: fBeginXact = BIT XACT_FLAGS = fBeginXact 7FRESERVEDBIT ISOLATION_LEVEL = BYTE XACT_NAME = B_VARBYTE BEGIN_XACT_NAME = B_VARBYTE RequestPayload = XACT_NAME XACT_FLAGS [ISOLATION_LEVEL BEGIN_XACT_NAME]
DIFFERENT_NAME is set in Status. COLMETADATA Token Stream Name: COLMETADATA Token Stream Function: Describes the for interpretation of following ROW . Stream Comments: The value is 0x81. This is used to tell the client the data type and length of the column data. It describes the format of the data found in a ROW data stream. All COLMETADATA data streams are grouped together. Token Stream-Specific Rules: TokenType = BYTE Count = USHORT UserType = USHORT/ULONG; (Changed to ULONG in TDS 7.2) fNullable = BIT fCaseSen = BIT usUpdateable = 2BIT ; 0 = ReadOnly ; 1 = Read/Write ; 2 = Unused fIdentity = BIT fComputed = BIT ; (introduced in TDS 7.2) usReservedODBC = 2BIT ; (only exists in TDS 7.3.A and below) fSparseColumnSet = BIT ; (introduced in TDS 7.3.B) fEncrypted = BIT ; (introduced in TDS 7.4) usReserved3 = BIT ; (introduced in TDS 7.4) fFixedLenCLRType = BIT ; (introduced in TDS 7.2) usReserved = 4BIT fHidden = BIT ; (introduced in TDS 7.2) fKey = BIT ; (introduced in TDS 7.2) fNullableUnknown = BIT ; (introduced in TDS 7.2) Flags = fNullable fCaseSen usUpdateable fIdentity (FRESERVEDBIT / fComputed) usReservedODBC (FRESERVEDBIT / fFixedLenCLRType) (usReserved / (FRESERVEDBIT fSparseColumnSet fEncrypted usReserved3)) ; (introduced in TDS 7.4) (FRESERVEDBIT / fHidden) (FRESERVEDBIT / fKey) (FRESERVEDBIT / fNullableUnknown)
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: Completion Acknowledgement OLDVALUE = %x00 NEWVALUE = %x00 19: back info of user instance for logins (login7) requesting so. OLDVALUE = %x00 NEWVALUE = B_VARCHAR 20: Routing OLDVALUE = %x00 %x00 Protocol = BYTE ProtocolProperty = USHORT AlternateServer = US_VARCHAR Protocol MUST be 0, specifying TCP-IP protocol. ProtocolProperty represents the TCP-IP port when Protocol is 0. A ProtocolProperty value of zero is not allowed when Protocol is TCP-IP. RoutingDataValue = Protocol ProtocolProperty AlternateServer RoutingDataValueLength = USHORT RoutingDataValueLength is the total length, in bytes, of the following fields: Protocol, ProtocolProperty, and AlternateServer. RoutingData = RoutingDataValueLength [RoutingDataValue] NEWVALUE = RoutingData Notes
LineNumber The line number in the SQL or stored procedure that caused the error. Line numbers begin at 1; therefore, if the line number is not applicable to the message as determined by the upper layer, the value of LineNumber will be 0. LOGINACK Stream Name: LOGINACK Token Stream Function: Used to send a response to a login request (LOGIN7) to the client. Token Stream Comments The value is 0xAD. If a LOGINACK is not received by the client as part of the procedure, the login to the server is unsuccessful. Stream-Specific Rules: TokenType = BYTE Length = USHORT Interface = BYTE TDSVersion = DWORD ProgName = B_VARCHAR MajorVer = BYTE MinorVer = BYTE BuildNumHi = BYTE BuildNumLow = BYTE ProgVersion = MajorVer MinorVer BuildNumHi
BuildNumLow Token Stream Definition: LOGINACK = TokenType Length Interface TDSVersion ProgName ProgVersion Token Stream Parameter Details Parameter Description TokenType LOGINACK_TOKEN Length The total length, in bytes, of the following fields: Interface, TDSVersion, Progname, and ProgVersion. Interface The type of with which the server will accept client requests: 0: SQL_DFLT (server confirms that whatever is sent by the client is acceptable. If the client requested SQL_DFLT, SQL_TSQL will be used). 1: SQL_TSQL (TSQL is accepted). TDSVersion The TDS version used by the server.<53> ProgName The name of the server. MajorVer The major version number (0-255). MinorVer The version number (0-255). BuildNumHi The high byte of the build number (0-255).
The token was removed in TDS 7.2. Token Stream-Specific Rules: TokenType = BYTE Identifier = USHORT OffSetLen = USHORT Token Stream Definition: OFFSET = TokenType Identifier OffSetLen Stream Parameter Details Parameter Description TokenType OFFSET_TOKEN Identifier The keyword to which OffSetLen refers. OffsetLen The offset in the SQL text buffer received by the server of the identifier. The SQL text buffer begins with an OffSetLen value of 0 (MOD 64 kilobytes if value of OffSet is larger than 64 kilobytes). ORDER Token Stream Name: ORDER Token Stream Function: Used to inform the client by columns the data is ordered. Token Stream Comments The value is 0xA9.
8 Grammar definition - token description 50 data stream 31 31 31 data type definitions 35 35 39 42 43 41 36 42 general rules 30 30 27 packet data stream headers 33 34 34 48 27 H Higher-layer triggered events client ( 114, 122) server ( 114, 129) I 192 192 21 11 129 Initialization client ( 114, 121) server ( 114, 129) 8 L Local events client ( 119, 127) 119 Logged In state ( 126, 133) 130 136 138 145 148 M Message processing client ( 114, 123) 127 126 126 126 123 125 125 124 server ( 114, 129) 133 134 129 133 130 132 130 Messages 17 27 17 25 77 21 19 syntax 17 27 17 25 77 50 21 19 17 N 10 O Other local events 127 134 13 P Packet data - token stream definition 78 80 81 82 85 87 88 89 93 95 100 101 102 104 104 105 106 108 109 111