MSSQL Server Architecture
SQL server contain 3 layers:
→ Protocol layer — >> It receives the request from client machine and respond to the client machine
→ SQL supports 3 protocols
>> TCP\IP
>> NAMED PIPES
>> Shared memory
>> The SNI -> unpacking the TDS packets to extract the original query written into Binary language (010101) sent to the relational engine
Relational Engine ::
Select Statements :
>> CMD Parser
— ->> It check s the syntax error , if any errors sent back
if it is without any errors s it will generate “” Query Tree “”
generate different Execution plan
>> Optimizer
>> Query executer
> Storage engine
Access methods — checking is t a query or transaction
>>> Buffer manager → Buffer pool → Pages
Get Jayasandeep’s stories in your inbox
Join Medium for free to get updates from this writer.
> > > Logical read → identifying the pages in buffer pool and reading the data directly from buffer
> > > Physical read → If the page is not available in the buffer pool and it has to fetch from the datafile to buffer pool and then read
The more physical read impact on the performance
Update query statements ::
→ same above process of select statements until access methods
→The update statements is a Transaction so the transaction will pass to the Transaction manager
> > Transaction manger — It commit the transaction to transaction log file and response to access methods and buffer manger — -> verifies whatever pages need s to updated available in buffer pool
-> Dirty pages :: A page which is modified by the transaction and the page is still residing the buffer pool
> > if not available in buffer pool, it will fetch pages from datafile to buffer and then make changes send s to buffer manager
> > > CHECK POINTER check pointer runs at regular intrevells and It will identify all such dirty pages and it will flush /push back to the datafile
every 60 sec it will run
>>> LAZY WRITER
It runs randomly and checks status of buffer pool like any pressure
identify inactive pages (a page sitting the buffer without any ) flushes back to to the data file






