Export (0) Print
Expand All

6 Appendix A: Product Behavior

The information in this specification is applicable to the following Microsoft products or supplemental software. References to product versions include released service packs:

  • Microsoft SQL Server 7.0

  • Microsoft SQL Server 2000

  • Microsoft SQL Server 2005

  • Microsoft SQL Server 2008

  • Microsoft SQL Server 2008 R2

  • Microsoft SQL Server 2012

  • Microsoft SQL Server 2014

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

SQL Server 2008 R2

7.3.B

SQL Server 2012

7.4

SQL Server 2014

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 was deprecated in SQL Server 2012. 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 by using the message header. The older implementation was for the client to send a 1-byte message (no header) containing "A" by using the out-of-band write.

<5> Section 2.2.5.1.2: COLLATION represents a collation in SQL Server (described in [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 in SQL Server 2005. A value of 2 denotes collations in SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, and SQL Server 2014.

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: Microsoft 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 are as follows.

SQL Server Version

Version Sent from Client to Server

SQL Server 7.0

0x00000070

SQL Server 2000

0x00000071

SQL Server 2000 SP1

0x01000071

SQL Server 2005

0x02000972

SQL Server 2008

0x03000A73

SQL Server 2008 R2

0x03000B73

SQL Server 2012

SQL Server 2014

0x04000074

<9> Section 2.2.6.4: The US_SUBBUILD returned by SQL Server is always 0.

<10> Section 2.2.6.4: In SQL Server 2012 and SQL Server 2014, the server always sends the value 0 for the INSTOPT option when 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 "MSSQLServer" may be provided by the client even in the absence of an explicit instance name. SQL Server 2000, SQL Server 2005, SQL Server 2008, and SQL Server 2008 R2, which support the INSTOPT field always validate the client-specified string against the server’s instance name.

<11> Section 2.2.7.5: The 0x4: DONE_INXACT 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 has to send DoneRowCount as LONG or ULONGLONG based on the negotiated TDS version.

However, sometimes the client cannot determine the server TDS version and cannot determine whether LONG or ULONGLONG is expected for DoneRowCount. If the client TDS level is 7.0 or 7.1, DoneRowCount is always LONG. If the client TDS level is 7.2, 7.3.A, 7.3.B, or 7.4, the DoneRowCount can 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 is LONG or ULONGLONG. It is ULONGLONG if VERSION in the prelogin response indicates that the server is SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014. Otherwise, DoneRowCount 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 any implementation, before the client performs this task, the server performs TDS version negotiation and determines whether to send LONG or ULONGLONG.

<13> Section 2.2.7.6: The 0x4: DONE_INXACT bit is not set by SQL Server and should be considered reserved for future use.

<14> Section 2.2.7.7: The 0x4: DONE_INXACT bit is not set by SQL Server and should be considered reserved for future use.

<15> Section 2.2.7.8: The Type 16: Transaction Manager Address is not used by SQL Server.

<16> Section 2.2.7.9: Numbers less than 20001 are reserved by SQL Server.

<17> Section 2.2.7.9: SQL Server does not raise system errors with severities of 0 through 9.

<18> 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.

<19> Section 2.2.7.11: Numbers less than 20001 are reserved by SQL Server.

<20> Section 2.2.7.12: The following table shows the values in network transfer format.

SQL Server

Client to server

Server to client

SQL Server 7.0

0x00000070

0x07000000

SQL Server 2000

0x00000071

0x07010000

SQL Server 2000 SP1

0x01000071

0x71000001

SQL Server 2005

0x02000972

0x72090002

SQL Server 2008*

0x03000A73

0x730A0003

SQL Server 2008 R2

0x03000B73

0x730B0003

SQL Server 2012

SQL Server 2014

0x04000074

0x74000004

*SQL Server 2008 TDS version 0x03000A73 does not include support for NBCROW and fSparseColumnSet.

<21> Section 3.2.2: In Microsoft implementations, the default value for the MDAC/WDAC and SNAC Client Request Timers is zero, which is interpreted as no timeout. For a SqlClient Client Request, the default value is 30 seconds. For a description of the data access drivers, see [MSDN-MDAC].

<22> Section 3.2.2: In Microsoft implementations, 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. For a description of the data access drivers, see [MSDN-MDAC].

 
Show:
© 2014 Microsoft