Exceptions, if any, are noted below. If a service pack or Quick Fix Engineering (QFE) number appears with the product version, behavior changed in that service pack or QFE. The new behavior also applies to subsequent service packs of the product unless otherwise specified. If a product edition appears with the product version, behavior is different in that product edition.
Unless otherwise specified, any statement of optional behavior in this specification that is prescribed using the terms SHOULD or SHOULD NOT implies product behavior in accordance with the SHOULD or SHOULD NOT prescription. Unless otherwise specified, the term MAY implies that the product does not follow the prescription.
<1> Section 1.3: The following table outlines the SQL Server version and the corresponding TDS version.
|
SQL Server version
|
TDS version
|
|
SQL Server 7.0
|
7.0
|
|
SQL Server 2000
|
7.1
|
|
SQL Server 2000 SP1
|
7.1 Revision 1
|
|
SQL Server 2005
|
7.2
|
|
SQL Server 2008
|
7.3.A, 7.3.B
|
|
SQL Server Denali
|
7.4
|
<2> Section 2.1: Microsoft Windows Named Pipes in message mode [PIPE]. Please see [MSDN-NamedPipes] for additional information related to Microsoft-specific implementations.
<3> Section 2.1: VIA is deprecated in SQL Server Denali. This means that VIA will never be the underlying transport protocol if either the server or the client can support TDS versions up to TDS 7.4 or higher.
<4> Section 2.2.4.3: Not all pre-SQL Server 7.0 servers support the attention signal using the message header. The older implementation was for the client to send a 1-byte message (no header) containing "A" using the out-of-band write.
<5> Section 2.2.5.1.2: COLLATION represents a collation in SQL Server [MSDN-Collation]. It can be either a SQL Server collation or a Windows collation.
Version can be of value 0, 1, or 2. A value of 0 denotes collations in SQL Server 2000. A value of 1 denotes collations introduced in SQL Server 2005. A value of 2 denotes collations introduced in SQL Server 2008.
The GetLocaleInfo Windows API can be used to retrieve information about the locale. In particular, querying for the LOCALE_IDEFAULTANSICODEPAGE locale information constant retrieves the code page information for the given locale.
For either collation type, the different comparison flags map to those defined as valid comparison flags for the CompareString Windows API.
However, for SQL collations with non-Unicode data, the SortId should be used to derive comparison information flags, such as whether for a given SortId a lowercase "a" equals an uppercase "A".
<6> Section 2.2.5.4.1: NULLTYPE can be sent to SQL Server (for example, in RPCRequest), but SQL Server never emits NULLTYPE data.
<7> Section 2.2.5.5.4:
Windows implementations return an error if a client does send a raw collation within a sql_variant.
<8> Section 2.2.6.3: The version numbers used by clients up to SQL Server Denali are as follows.
|
SQL Server Version
|
Version Sent from Client to Server
|
|
7.0
|
0x00000070
|
|
2000
|
0x00000071
|
|
2000 SP1
|
0x01000071
|
|
2005
|
0x02000972
|
|
2008
|
0x03000A73
|
|
2008
|
0x03000B73
|
|
SQL Server Denali
|
0x04000074
|
<9> Section 2.2.6.4: The US_SUBBUILD returned by SQL Server is always 0.
<10> Section 2.2.6.4: Beginning with SQL Server Denali, the server always sends the value 0 for the INSTOPT option, if the string specified in the client’s INSTOPT option is "MSSQLServer". The reason for this is that "MSSQLServer" is the name of a default instance, and it may be provided by the client even in the absence of an explicit instance name. Previous versions of SQL Server which support the INSTOPT field always validate the client-specified string against the server’s instance name.
<11> Section 2.2.7.5: This bit is not set by SQL Server and should be considered reserved for future use.
<12> Section 2.2.7.5: The DONE token is usually sent after login has succeeded. In this case, the negotiated TDS version is known, and the client can determine whether DoneRowCount is LONG or ULONGLONG. However, when login fails for any reason, SQL Server may also send an error message followed by a DONE token. In this case, the server should have already done TDS version negotiation and must send DoneRowCount as LONG or ULONGLONG based on the negotiated TDS version. However, the client may not be able to determine the server TDS version and thus sometimes cannot determine whether LONG or ULONGLONG should be expected for DoneRowCount. If the client TDS level is lower than 7.2, DoneRowCount will always be LONG. If the client TDS level is 7.2 or higher, the DoneRowCount could be LONG or ULONGLONG depending on which version of the server the client is connecting to. SNAC and SQLClient use the VERSION option in the prelogin response to detect whether DoneRowCount will be LONG or ULONGLONG. It will be ULONGLONG if VERSION in the prelogin response indicates that the server is SQL Server 2005 or higher; otherwise, it is LONG. A third-party implementation should have its own logic to detect whether DoneRowCount is LONG or ULONGLONG or to make the client able to handle both LONG and ULONGLONG. In addition, this also means that the server has already done TDS version negotiation and can determine whether LONG or ULONGLONG should be sent.
<13> Section 2.2.7.6: This bit is not set by SQL Server and should be considered reserved for future use.
<14> Section 2.2.7.7: This bit is not set by SQL Server and should be considered reserved for future use.
<15> Section 2.2.7.8: This type is not used by SQL Server.
<16> Section 2.2.7.9:
SQL Server does not raise system errors with severities of 0 through 9.
<17> Section 2.2.7.9: For compatibility reasons, SQL Server converts severity 10 to severity 0 before returning the error information to the calling application.
<18> Section 2.2.7.10: Numbers less than 20001 are reserved by SQL Server.
<19> Section 2.2.7.11: The following table shows the values in network transfer format.
|
SQL Server
|
Client to server
|
Server to client
|
|
7.0
|
0x00000070
|
0x07000000
|
|
2000
|
0x00000071
|
0x07010000
|
|
2000 SP1
|
0x01000071
|
0x71000001
|
|
2005
|
0x02000972
|
0x72090002
|
|
*2008
|
0x03000A73
|
0x730A0003
|
|
2008
|
0x03000B73
|
0x730B0003
|
|
SQL Server Denali
|
0x04000074
|
0x74000004
|
*SQL Server 2008 TDS version 0x03000A73 does not include support for NBCROW and fSparseColumnSet.
<20> Section 3.2.2: In a Windows implementation, the default value for the MDAC/WDAC and SNAC Client Request Timers is zero, which is interpreted as no time-out. For a SqlClient Client Request the default value is 30 seconds. Please refer to Microsoft Data Access Components ([MSDN-MDAC]) for the data access drivers mentioned here.
<21> Section 3.2.2: In a Windows implementation the default setting for MDAC/WDAC and SNAC Cancel Timer values is 120 seconds. For a SqlClient Cancel Timer the default value is 5 seconds. Please refer to Microsoft Data Access Components ([MSDN-MDAC]) for the data access drivers mentioned here.