TDS, net-library, and network protocols

Source: Internet
Author: User
TDS (table format data stream Protocol ):SQL Server uses an application called table format data stream (TDS ). ProgramLevel protocol for communication between client applications and SQL Server. TDS packets are encapsulated in the packets generated by the protocol stack used by the net-library.
For example, if a TCP/IP socket net-library is used, the TDS data packet is encapsulated in the TCP/IP data packet of the basic protocol. The content of the data packet sent back from the result set to the application depends on whether for XML is specified in the transact-SQL statement passed to the database engine:
If for XML is not specified, the database engine sends the relational result set back to the application. The TDS data package contains the result row set. Each row contains one or more columns, as specified in the SELECT statement selection list.
If for XML is specified, the database engine returns the XML document to the application in the form of a stream. In the TDS data packet, the XML file is formatted as a single, long Unicode value. The size of each data packet is about 4 kb.
You can configure the data packet size of SQL Server, that is, the data packet size of TDS. The size of the TDS data packet on most clients is 4 kb by default (the default size of the DB-library application is 512 bytes). Tests have proved that in almost all solutions, this is the best data packet size for TDs. The size of the TDS data packet can be larger than that of the data packet in the basic protocol. In this case, the protocol stack on the computer that sends the data packet Automatically splits the TDS data packet into units suitable for the protocol data packet size, the protocol stack on the client computer reassembles the TDS data packets on the receiving computer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.