0% found this document useful (0 votes)
23 views

Microsoft SQL Server Components

SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET, SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET.SQL DEVELOPER COMPONENET .

Uploaded by

shivananda H N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Microsoft SQL Server Components

SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET, SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET. SQL DEVELOPER COMPONENET.SQL DEVELOPER COMPONENET .

Uploaded by

shivananda H N
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Build,Build,

SkillSkill
and and Enable
Enable
Microsoft SQL Server Components
Index

• Understanding T-SQL

Build, Skill and Enable


• SQL DBA Tool

• SQL Server Components

• SQL Server Main Internal Components


Build, Skill and Enable
T-SQL
Build, Skill and Enable
SQL DBA Tool
Build, Skill and Enable
Understanding T-SQL
Build, Skill and Enable
SQL Server DBA Tool
Build, Skill and Enable
SQL Server Components
A Sample SQL Based Transaction

Build, Skill and Enable


Build, Skill and Enable
SQL Server Components
SQL Server Components
MS SQL Server is a client-server architecture. MS SQL Server

Build, Skill and Enable


process starts with the client application sending a request. The
SQL Server accepts, processes and replies to the request with
processed data. Let's discuss in detail the entire architecture
shown below:

There are three major components in SQL Server Architecture:


❑ Protocol Layer
❑ Relational Engine
❑ Storage Engine
Protocol Layer - SNI

MS SQL SERVER PROTOCOL LAYER supports 3 Type of Client

Build, Skill and Enable


Server Architecture. We will start with "Three Type of Client Server
Architecture" which MS SQL Server supports.

❑Shared Memory

❑TCP/IP

❑Named Pipe
Protocol Layer -Shared Memory

Build, Skill and Enable


Build, Skill and Enable
Protocol Layer -TCP/IP
Protocol Layer - Named Pipe

Build, Skill and Enable


Protocol Layer - What is TDS?

❑ TDS stands for Tabular Data Stream.

Build, Skill and Enable


❑ All 3 protocols use TDS packets. TDS is encapsulated in
Network packets. This enables data transfer from the
client machine to the server machine.

❑ TDS was first developed by Sybase and is now Owned by


Microsoft
Relational Engine
The Relational Engine is also known as the Query Processor. It has the SQL
Server components that determine what exactly a query needs to do and how

Build, Skill and Enable


it can be done best.

It is responsible for the execution of user queries by requesting data from the
storage engine and processing the results that are returned.

There are 3 major components of the Relational Engine.

❑ CMD Parser
❑ Optimizer
❑ Query Executor
Relational Engine- CMD Parser
Data once received from Protocol Layer

Build, Skill and Enable


is then passed to Relational Engine.

"CMD Parser" is the first component of


Relational Engine to receive the Query
data.

The principal job of CMD Parser is to


check the query for Syntactic and
Semantic error. Finally, it generates a
Query Tree.
Relational Engine- CMD Parser
❑ Syntactic Check – The right keyword in the query.

Build, Skill and Enable


❑ Semantic Check - It checks whether Column name, Table name
being queried exist in Schema.

❑ Optimizer - The work of the optimizer is to create an execution plan for


the user's query. This is the plan that will determine how the user query
will be executed. Note that not all queries are optimized. Optimization is
done for DML (Data Modification Language) commands like SELECT,
INSERT, DELETE, and UPDATE. Such queries are first marked then send
to the optimizer. DDL commands like CREATE and ALTER are not
optimized, but they are instead compiled into an internal form.
Storage Engine

Databse Name

Build, Skill and Enable


The work of the Storage Engine is to
store data in a storage system like
Disk or SAN and retrieve the data
when needed.
Storage Engine- File Type in SQL
❑ Primary file
•Every database contains one Primary file.

Build, Skill and Enable


•This store all important data related to tables, views,
Triggers, etc.
•Extension is .mdf usually but can be of any extension

❑ Secondary file
Database may or may not contains multiple Secondary files.
This is optional and contain user-specific data.
Extension is .ndf usually but can be of any extension.

❑ Log file
Also known as Write ahead logs.
Extension is .ldf
Used for Transaction Management.
.
Storage Engine- Access Method
❑ It acts as an interface between query executor and Buffer
Manager/Transaction Logs.

Build, Skill and Enable


❑ Access Method itself does not do any execution.

❑ The first action is to determine whether the query is:


Select Statement (DDL)
Non- Select Statement (DDL & DML)

❑ Depending upon the result, the Access Method takes the


following steps:
❖ If the query is DDL, SELECT statement, the query is pass to
the Buffer Manager for further processing.

❖ And if query if DDL, Update statement, the query is pass to


Transaction Manager.
Build, Skill and Enable
SQL Server Main Internal Components
SQL Server Main Internal Components

❑Data Pages

Build, Skill and Enable


❑Write Ahead Logging (WAL)

❑Checkpoint
Data Pages
❑Each Data Page has 8kb
❑Every data in SQL Server is stored in Data pages

Build, Skill and Enable


Write Ached Logging
❑ Ensure Every changes in the data pages has an associate
register in the Transaction Logs

Build, Skill and Enable


❑ Pages which store the data is also known as Dirty Pages
Checkpoint

Checkpoint will flush the

Build, Skill and Enable


dirty pages ( Data pages
change in memory ) to disk
in defined interval . The
default is 1 minute

You might also like