Posts

Showing posts with the label TDS

SQL Server, better performance with the NOCOUNT option

Image
Hi Guys, As you know in our blog, the final goal is always performance. So today is the time to talk about another best practice. Are you Ready? yes? go! p.s. By the way, if you want to know when my posts come out follow me also on linkedin here   SET NOCOUNT ON What is the option NOCOUNT?    The NOCOUNT is an option, its value can be ON or OFF and determines whether  the DONE_IN_PROC messages are sent to the client of not. The DONE_IN_PROC message indicates the completion status of an SQL statement within a stored procedure (and therefore also a trigger). Inside a SP a message is sent for ech executed statement. By default, the NOCOUNT option is set to OFF but you can set it to ON with the command   SET NOCOUNT ON In this case, SQL Server will not send the DONE_IN_PROC messages . DONE_IN_PROC messages are sent to the client via the TDS protocol. Tabular (o token) data Stream (or TDS) is the protocol implemented by drivers that allows an applicatio...

Speaking to Sql Server, sniffing the TDS protocol

Image
Hello friends!  If yesterday you read my post and found it definitely boring (for the topic of course and not for how it was written to the author 😁) well today I promise you that the topic will be much more interesting! Let's talk about Sniffing , let's talk about going to see what happens when we "log in" or when we send a Query to SQL Server.  We will do this by taking a look to the little known tabular data stream (TDS) protocol built on top of the TCP/IP protocol. Ready! The TDS protocol What is the Tabular data stream (TDS) protocol?  The TDS is the protocol used by the SQL Server client Net-Library to communicates with SQL Server . TDS is specific to SQL Server and it is a low-level protocol that specifies both commands and data in a specific arrangement.  TDS encapsulate the TCP/IP protocol. Sniffing TDS packets you can read from the network the requests that your application do to the SQL Server and read the answer .   How to Sniff data from the ne...