Databases Reference
In-Depth Information
Tabular Data Stream (TDS) Endpoints
TDS is a Microsoft-proprietary protocol originally designed by Sybase that is used to interact with a
database server. Once a connection has been made using a network protocol such as TCP/IP, a link
is established to the relevant TDS endpoint that then acts as the communication point between the
client and the server.
There is one TDS endpoint for each network protocol and an additional one reserved for use by the
dedicated administrator connection (DAC). Once connectivity is established, TDS messages are used
to communicate between the client and the server.
The SELECT statement is sent to the SQL Server as a TDS message across a TCP/IP connection
(TCP/IP is the default protocol).
Protocol Layer
When the protocol layer in SQL Server receives your TDS packet, it has to reverse the work of the
SNI at the client and unwrap the packet to i nd out what request it contains. The protocol layer
is also responsible for packaging results and status messages to send back to the client as TDS
messages.
Our SELECT statement is marked in the TDS packet as a message of type “SQL Command,” so it's
passed on to the next component, the Query Parser, to begin the path toward execution.
Figure 1-2 shows where our query has gone so far. At the client, the statement was wrapped in a
TDS packet by the SQL Server Network Interface and sent to the protocol layer on the SQL Server
where it was unwrapped, identii ed as a SQL Command, and the code sent to the Command Parser
by the SNI.
Language Event
Cmd Parser
TDS
SQL Server
Network Interface
Optimizer
Query Executor
SNI
Protocol
Layer
Relational Engine
FIGURE 1-2
Command Parser
The Command Parser's role is to handle T-SQL language events. It i rst checks the syntax and
returns any errors back to the protocol layer to send to the client. If the syntax is valid, then the next
step is to generate a query plan or i nd an existing plan. A query plan contains the details about how
SQL Server is going to execute a piece of code. It is commonly referred to as an execution plan.
Search WWH ::




Custom Search