How to establish a connection to SQL Server?

In SQL Server, data communication is conducted in the diagram below.

                                                                                              

SNI layer

When SQL Server communicates with clients, a layer called SNI (SQL Server Network Interface) abstracts multiple protocols. Therefore, at the upper layer of SNI, there is no need to be concerned about differences between the protocols.

We can check which protocols are enabled using SQL Server Configuration Manager.


Additionally, we can check which protocol is being used for each connection from the result of the following query. SQL Server can listen on multiple protocols simultaneously.

/* query */
select session_id, net_transport from sys.dm_exec_connections


Application layer

SQL Server communicates with clients using a protocol called Tabular Data Stream (TDS). TDS is an application layer protocol that facilitates interaction with a database server.

[MS-TDS]: Tabular Data Stream Protocol | Microsoft Learn
[MS-TDS]: Message Processing Events and Sequencing Rules | Microsoft Learn