SlideShare a Scribd company logo
2
Most read
9
Most read
12
Most read
DBA
Architecture
Intro
Introduction
MS SQL Server is a database server
Product of Microsoft
Enables user to write queries and other SQL
statements and execute them
Consists of several features. A few are:
◦ Query Analyzer
◦ Profiler
◦ Service Manager
◦ Bulk Copy Program (BCP)
Profiler
Monitoring tool
Used for performance tuning
Uses traces – an event monitoring protocol
Event may be a query or a transaction like logins etc
Service Manager
Helps us to manage services
More than one instance of SQL server can be
installed in a machine
First Instance is called as default instance
Rest of the instances (16 max) are called as named
instances
Service manager helps in starting or stopping the
instances individually
Instances
Each instance is hidden from another instance
Enhances security
Every instance has its own set of Users,Admins,
Databases,Collations
Advantage of having multiple instance is
◦ Multi company support (Each company can have its
own instance and create databases on the same server,
independent on each other)
◦ Server consolidation (Can host up to 10 server
applications on a single machine)
BCP
Bulk Copy Program
A powerful command line utility that enables
us to transfer large number of records from a
file to database
Time taken for copying to and from database
is very less
Helps in back up and restoration
QueryAnalyzer
Allows us to write queries and SQL statements
Checks syntax of the SQL statement written
Executes the statements
Store and reload statements
Save the results in file
View reports (either as grid or as a text)
SQL DatabaseObjects
A SQL Server database has lot of objects
like
◦ Tables
◦ Views
◦ Stored Procedures
◦ Functions
◦ Rules
◦ Defaults
◦ Cursors
◦ Triggers
System Databases
By default SQL server has 4 databases
◦ Master : System defined stored procedures, login details,
configuration settings etc
◦ Model :Template for creating a database
◦ Tempdb : Stores temporary tables.This db is created when
the server starts and dropped when the server shuts down
◦ Msdb : Has tables that have details with respect to alerts,
jobs. Deals with SQL Server Agent Service
ArchitectureOverview
Schema and Data Structure (Objects)
Storage Architecture
◦ Data Blocks, Extents, and Segments
◦ Storage Allocation
◦ Managing Extents and Pages
◦ Tablespaces and Datafiles
◦ SQL Server Data Files
◦ Mapping ofTablespaces and Filegroups
Logging Model
Data Dictionary
Schema and Data Structures (Objects)
Schema – a collection of objects
owned by a database user
Schemas in SQL Server provide
logical separation of objects,
similar to Oracle’s schema
Oracle SQL Server
Table Table
Index Index
View View
Synonym Synonym
Sequence Identity Columns
Procedure Stored Procedure
Function Function
Package N/A
Queue in Streams Advanced Queuing Service Broker Queue
Object Type Type
XML DB XML Schema Collection
Comparison of Core Schema and Data Structures (Objects)
StorageArchitecture
Database storage architecture includes physical and logical structures
Physical structures are data files, log files, and operating system blocks
Logical structures are subdivisions of data files used to manage storage space
Data File Data File Data File Data File Data File Data File
TemporaryTablespace Groups
Tablespace
ExtentExtent
FilegroupTablespace
Segment Segment
ExtentExtent
Filegroup
Heap/Index Heap/Index
ExtentExtent Extent
BlocksBlocksBlocks Blocks Pages Pages Pages
Data Blocks, Extents, and Segments
Structure Oracle SQL Server 2008
Smallest unit of
logical storage
Block Page
Block size Variable 8 KB fixed
Storage allocation
Performed in multiple
blocks; are ‘extents’
Performed in multiple
pages; are ‘extents’
Extent size Variable 64 KB fixed
Segment
Any logical structure
that is allocated
storage
No equivalent structure
Storage
Allocation
Fundamental difference in storage allocation between Oracle
and SQL Server
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
2K
block
6 x 2K = 12K
EXTENT
8 x 2K = 16K
EXTENT
12K + 16K = 28K
SEGMENT
(Table/Index)
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8K
block
8K
block
8K
block
2K
block
8 x 8K = 64K
EXTENT
8 x 8K = 64K
EXTENT
64K + 64K =
128K
HEAP/INDEX
Oracle SQL Server
Managing Extents and Pages
In Oracle, each extent is dedicated to an allocated object. In SQL Server, the equivalent is a
uniform extent.
SQL Server uses mixed extents: pages are allocated to objects with less than 8 blocks of data
Similar to the Oracle bitmap functionality used to manage free space and extent allocation,
SQL Server uses the GlobalAllocation Map (GAM) and Shared GlobalAllocation Map (SGAM)
Oracle keeps track of extents using extent allocation maps
Managing Extents and Pages
(Continued)
Current Use of Extent
GAM Bit
Setting
SGAM Bit
Setting
Free, not being used 1 0
Uniform extent, or full
mixed extent
0 0
Mixed extent with free
pages
0 1
File Header Extent
Extents in
SQL Server
GAMs and SGAMs
Tablespaces and Data files
Oracle and SQL Server store data in data files
The largest logical storage structure in Oracle is a tablespace
The largest logical storage structure in SQL Server is a filegroup
Tablespaces/filegroups are used to group application objects
Tablespaces/filegroups optimize administration of data files
SQLServer Data Files
Three file types supported by SQL Server:
Primary Data Files
Secondary Data
Files
Log Data Files
Mapping ofTablespaces
and Filegroups System Tablespace
SysAux Tablespace
Temporary
Tablespace
BigFile Tablespace
User DataTablespace
User Index
Tablespace
UndoTablespace
Redo Log Files
Master DB
Resource DB
TempDB
Model DB
MSDB
User DB
Data FG
Index FG
Log File(s)
Oracle Database Instance SQL Server Instance
Data file
Data fileData file
Data fileData file
Tablespace Group
Data fileData file
Data fileData file
Data fileData file
Data fileData file
Data fileData file
Redo Log
Redo Log
Redo Log
Log fileData file
Log fileData file
Log fileData file
Log fileData file
User Database
Data fileData file
Data fileData file
Log file
Log fileData file
Logging Model
Oracle uses online redo logs to
record changes made to the
database by transactions and
undo segments to capture the
‘before image’ of data
SQL Server implements both of
these functions using transaction
logs. Each transaction record
contains the undo and redo
image of the transaction.
Data Dictionary
In Oracle the data dictionary is stored under the SYS schema in the SYSTEM tablespace
In SQL Server the data dictionary consists of:
◦ CatalogView—the best way to access system metadata
◦ Backward CompatibilityViews—All system tables from previous releases are provided as
backward compatibility views
◦ Dynamic ManagementViews—to view the current state of the SQL Server system. Provide
real-time snapshots of internal memory structures indicating the server state.
◦ INFORMATION_SCHEMA views—SQL-99 method to view system metadata
SQL Server’s Resource database contains the metadata for system stored procedures

More Related Content

What's hot (20)

PPT
Sql Server Basics
rainynovember12
 
PPTX
Oracle architecture ppt
Deepak Shetty
 
PDF
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
Edureka!
 
PPTX
Introduction of ssis
deepakk073
 
PPTX
Oracle DBA
shivankuniversity
 
PPTX
NOSQL Databases types and Uses
Suvradeep Rudra
 
PPTX
Basic oracle-database-administration
sreehari orienit
 
PPTX
Building an Effective Data Warehouse Architecture
James Serra
 
PPT
Sql server basics
Dilfaroz Khan
 
PPTX
Sql server basics
VishalJharwade
 
PPTX
Oracle architecture with details-yogiji creations
Yogiji Creations
 
PDF
Snowflake free trial_lab_guide
slidedown1
 
PPTX
Microsoft SQL Server Database Administration.pptx
samtakke1
 
PPTX
The SQL Server 2022 Workshop.pptx
UmooraMinhaji
 
PPTX
Structured query language(sql)ppt
Gowarthini
 
PPTX
Snowflake essentials
qureshihamid
 
PPTX
NoSQL databases - An introduction
Pooyan Mehrparvar
 
PPT
Files Vs DataBase
Dr. C.V. Suresh Babu
 
PPTX
MS Sql Server: Introduction To Database Concepts
DataminingTools Inc
 
PPTX
Introduction of sql server indexing
Mahabubur Rahaman
 
Sql Server Basics
rainynovember12
 
Oracle architecture ppt
Deepak Shetty
 
MySQL Tutorial For Beginners | Relational Database Management System | MySQL ...
Edureka!
 
Introduction of ssis
deepakk073
 
Oracle DBA
shivankuniversity
 
NOSQL Databases types and Uses
Suvradeep Rudra
 
Basic oracle-database-administration
sreehari orienit
 
Building an Effective Data Warehouse Architecture
James Serra
 
Sql server basics
Dilfaroz Khan
 
Sql server basics
VishalJharwade
 
Oracle architecture with details-yogiji creations
Yogiji Creations
 
Snowflake free trial_lab_guide
slidedown1
 
Microsoft SQL Server Database Administration.pptx
samtakke1
 
The SQL Server 2022 Workshop.pptx
UmooraMinhaji
 
Structured query language(sql)ppt
Gowarthini
 
Snowflake essentials
qureshihamid
 
NoSQL databases - An introduction
Pooyan Mehrparvar
 
Files Vs DataBase
Dr. C.V. Suresh Babu
 
MS Sql Server: Introduction To Database Concepts
DataminingTools Inc
 
Introduction of sql server indexing
Mahabubur Rahaman
 

Viewers also liked (18)

PPTX
Microsoft SQL Server internals & architecture
Kevin Kline
 
PPTX
Microsoft sql server architecture
Naveen Boda
 
PPT
Sql architecture
rchakra
 
PPTX
Sql Server 2012
Performics.Convonix
 
PPT
ASP .net MVC
Divya Sharma
 
PPSX
Memory management in sql server
Prashant Kumar
 
PPTX
Introduction to microsoft sql server 2008 r2
Eduardo Castro
 
PDF
Sql server 2016 new features
Ajeet Singh
 
PPTX
What's new in SQL Server 2016
James Serra
 
PPTX
MDF and LDF in SQL Server
Masum Reza
 
PDF
Introducing Microsoft SQL Server 2012
Intergen
 
PDF
Why & how to optimize sql server for performance from design to query
Antonios Chatzipavlis
 
PPTX
SQL Server Reporting Services 2008
VishalJharwade
 
PDF
Tp Sql Server Integration Services 2008
Abdelouahed Abdou
 
PDF
SQL Server 2016 SSRS and BI
MSDEVMTL
 
PDF
Ssis 2016 RC3
MSDEVMTL
 
PPT
MySql slides (ppt)
webhostingguy
 
PDF
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
Microsoft SQL Server internals & architecture
Kevin Kline
 
Microsoft sql server architecture
Naveen Boda
 
Sql architecture
rchakra
 
Sql Server 2012
Performics.Convonix
 
ASP .net MVC
Divya Sharma
 
Memory management in sql server
Prashant Kumar
 
Introduction to microsoft sql server 2008 r2
Eduardo Castro
 
Sql server 2016 new features
Ajeet Singh
 
What's new in SQL Server 2016
James Serra
 
MDF and LDF in SQL Server
Masum Reza
 
Introducing Microsoft SQL Server 2012
Intergen
 
Why & how to optimize sql server for performance from design to query
Antonios Chatzipavlis
 
SQL Server Reporting Services 2008
VishalJharwade
 
Tp Sql Server Integration Services 2008
Abdelouahed Abdou
 
SQL Server 2016 SSRS and BI
MSDEVMTL
 
Ssis 2016 RC3
MSDEVMTL
 
MySql slides (ppt)
webhostingguy
 
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
Ad

Similar to MS-SQL SERVER ARCHITECTURE (20)

PPT
ora_sothea
thysothea
 
PPT
R12 d49656 gc10-apps dba 07
zeesniper
 
PPT
App D
Sudharsan S
 
PPTX
Orcale dba training
Ugs8008
 
PPTX
Oracle DBA Training in Hyderabad
united global soft
 
PPTX
Oracle DBA Training in Hyderabad
Ugs8008
 
PPT
Higher Productivity With Ase
sparkwan
 
PPT
Saying goodbye to SQL Server 2000
ukdpe
 
PDF
Optimizing SQL Server 2012 for SharePoint 2013
SharePoint Saturday New Jersey
 
PPT
SQL Server 2000 Research Series - Architecture Overview
Jerry Yang
 
PPTX
Optimize SQL server performance for SharePoint
serge luca
 
PPT
Lecture2 oracle ppt
Hitesh Kumar Markam
 
PPTX
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
TIB Academy
 
PPTX
Introduction to Oracle Database
puja_dhar
 
PPT
Introduction to oracle
durgaprasad1407
 
PPTX
Oracle DBA Online Trainingin India
united global soft
 
PPTX
Oracle DBA Training in Hyderabad
united global soft
 
PPT
Managing SQLserver
Concentrated Technology
 
PDF
SQLServer Database Structures
Antonios Chatzipavlis
 
ora_sothea
thysothea
 
R12 d49656 gc10-apps dba 07
zeesniper
 
Orcale dba training
Ugs8008
 
Oracle DBA Training in Hyderabad
united global soft
 
Oracle DBA Training in Hyderabad
Ugs8008
 
Higher Productivity With Ase
sparkwan
 
Saying goodbye to SQL Server 2000
ukdpe
 
Optimizing SQL Server 2012 for SharePoint 2013
SharePoint Saturday New Jersey
 
SQL Server 2000 Research Series - Architecture Overview
Jerry Yang
 
Optimize SQL server performance for SharePoint
serge luca
 
Lecture2 oracle ppt
Hitesh Kumar Markam
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
TIB Academy
 
Introduction to Oracle Database
puja_dhar
 
Introduction to oracle
durgaprasad1407
 
Oracle DBA Online Trainingin India
united global soft
 
Oracle DBA Training in Hyderabad
united global soft
 
Managing SQLserver
Concentrated Technology
 
SQLServer Database Structures
Antonios Chatzipavlis
 
Ad

More from Douglas Bernardini (20)

PDF
Top reasons to choose SAP hana
Douglas Bernardini
 
PDF
The REAL face of Big Data
Douglas Bernardini
 
PDF
How can Hadoop & SAP be integrated
Douglas Bernardini
 
PDF
Hadoop benchmark: Evaluating Cloudera, Hortonworks, and MapR
Douglas Bernardini
 
PDF
SAP HORTONWORKS
Douglas Bernardini
 
PPTX
R-language
Douglas Bernardini
 
PPTX
REDSHIFT - Amazon
Douglas Bernardini
 
PPTX
Splunk
Douglas Bernardini
 
PPTX
Finance month closing with HANA
Douglas Bernardini
 
PDF
RDBMS x NoSQL
Douglas Bernardini
 
PDF
SAP - SOLUTION MANAGER
Douglas Bernardini
 
PDF
DBA oracle
Douglas Bernardini
 
PDF
Hortonworks.Cluster Config Guide
Douglas Bernardini
 
PPTX
SAP Business Objects - Lopes Supermarket
Douglas Bernardini
 
PPT
SAP - Business Objects - Ri happy
Douglas Bernardini
 
PPTX
Hadoop on retail
Douglas Bernardini
 
PPTX
Retail: Big data e Omni-Channel
Douglas Bernardini
 
DOCX
Granular Access Control Using Cell Level Security In Accumulo
Douglas Bernardini
 
PPTX
Proposta aderencia drogaria onofre
Douglas Bernardini
 
PDF
SAP-Solution-Manager
Douglas Bernardini
 
Top reasons to choose SAP hana
Douglas Bernardini
 
The REAL face of Big Data
Douglas Bernardini
 
How can Hadoop & SAP be integrated
Douglas Bernardini
 
Hadoop benchmark: Evaluating Cloudera, Hortonworks, and MapR
Douglas Bernardini
 
SAP HORTONWORKS
Douglas Bernardini
 
R-language
Douglas Bernardini
 
REDSHIFT - Amazon
Douglas Bernardini
 
Finance month closing with HANA
Douglas Bernardini
 
RDBMS x NoSQL
Douglas Bernardini
 
SAP - SOLUTION MANAGER
Douglas Bernardini
 
DBA oracle
Douglas Bernardini
 
Hortonworks.Cluster Config Guide
Douglas Bernardini
 
SAP Business Objects - Lopes Supermarket
Douglas Bernardini
 
SAP - Business Objects - Ri happy
Douglas Bernardini
 
Hadoop on retail
Douglas Bernardini
 
Retail: Big data e Omni-Channel
Douglas Bernardini
 
Granular Access Control Using Cell Level Security In Accumulo
Douglas Bernardini
 
Proposta aderencia drogaria onofre
Douglas Bernardini
 
SAP-Solution-Manager
Douglas Bernardini
 

Recently uploaded (20)

PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Digital Circuits, important subject in CS
contactparinay1
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 

MS-SQL SERVER ARCHITECTURE

  • 2. Introduction MS SQL Server is a database server Product of Microsoft Enables user to write queries and other SQL statements and execute them Consists of several features. A few are: ◦ Query Analyzer ◦ Profiler ◦ Service Manager ◦ Bulk Copy Program (BCP)
  • 3. Profiler Monitoring tool Used for performance tuning Uses traces – an event monitoring protocol Event may be a query or a transaction like logins etc
  • 4. Service Manager Helps us to manage services More than one instance of SQL server can be installed in a machine First Instance is called as default instance Rest of the instances (16 max) are called as named instances Service manager helps in starting or stopping the instances individually
  • 5. Instances Each instance is hidden from another instance Enhances security Every instance has its own set of Users,Admins, Databases,Collations Advantage of having multiple instance is ◦ Multi company support (Each company can have its own instance and create databases on the same server, independent on each other) ◦ Server consolidation (Can host up to 10 server applications on a single machine)
  • 6. BCP Bulk Copy Program A powerful command line utility that enables us to transfer large number of records from a file to database Time taken for copying to and from database is very less Helps in back up and restoration
  • 7. QueryAnalyzer Allows us to write queries and SQL statements Checks syntax of the SQL statement written Executes the statements Store and reload statements Save the results in file View reports (either as grid or as a text)
  • 8. SQL DatabaseObjects A SQL Server database has lot of objects like ◦ Tables ◦ Views ◦ Stored Procedures ◦ Functions ◦ Rules ◦ Defaults ◦ Cursors ◦ Triggers
  • 9. System Databases By default SQL server has 4 databases ◦ Master : System defined stored procedures, login details, configuration settings etc ◦ Model :Template for creating a database ◦ Tempdb : Stores temporary tables.This db is created when the server starts and dropped when the server shuts down ◦ Msdb : Has tables that have details with respect to alerts, jobs. Deals with SQL Server Agent Service
  • 10. ArchitectureOverview Schema and Data Structure (Objects) Storage Architecture ◦ Data Blocks, Extents, and Segments ◦ Storage Allocation ◦ Managing Extents and Pages ◦ Tablespaces and Datafiles ◦ SQL Server Data Files ◦ Mapping ofTablespaces and Filegroups Logging Model Data Dictionary
  • 11. Schema and Data Structures (Objects) Schema – a collection of objects owned by a database user Schemas in SQL Server provide logical separation of objects, similar to Oracle’s schema Oracle SQL Server Table Table Index Index View View Synonym Synonym Sequence Identity Columns Procedure Stored Procedure Function Function Package N/A Queue in Streams Advanced Queuing Service Broker Queue Object Type Type XML DB XML Schema Collection Comparison of Core Schema and Data Structures (Objects)
  • 12. StorageArchitecture Database storage architecture includes physical and logical structures Physical structures are data files, log files, and operating system blocks Logical structures are subdivisions of data files used to manage storage space Data File Data File Data File Data File Data File Data File TemporaryTablespace Groups Tablespace ExtentExtent FilegroupTablespace Segment Segment ExtentExtent Filegroup Heap/Index Heap/Index ExtentExtent Extent BlocksBlocksBlocks Blocks Pages Pages Pages
  • 13. Data Blocks, Extents, and Segments Structure Oracle SQL Server 2008 Smallest unit of logical storage Block Page Block size Variable 8 KB fixed Storage allocation Performed in multiple blocks; are ‘extents’ Performed in multiple pages; are ‘extents’ Extent size Variable 64 KB fixed Segment Any logical structure that is allocated storage No equivalent structure
  • 14. Storage Allocation Fundamental difference in storage allocation between Oracle and SQL Server 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 2K block 6 x 2K = 12K EXTENT 8 x 2K = 16K EXTENT 12K + 16K = 28K SEGMENT (Table/Index) 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8K block 8K block 8K block 2K block 8 x 8K = 64K EXTENT 8 x 8K = 64K EXTENT 64K + 64K = 128K HEAP/INDEX Oracle SQL Server
  • 15. Managing Extents and Pages In Oracle, each extent is dedicated to an allocated object. In SQL Server, the equivalent is a uniform extent. SQL Server uses mixed extents: pages are allocated to objects with less than 8 blocks of data Similar to the Oracle bitmap functionality used to manage free space and extent allocation, SQL Server uses the GlobalAllocation Map (GAM) and Shared GlobalAllocation Map (SGAM) Oracle keeps track of extents using extent allocation maps
  • 16. Managing Extents and Pages (Continued) Current Use of Extent GAM Bit Setting SGAM Bit Setting Free, not being used 1 0 Uniform extent, or full mixed extent 0 0 Mixed extent with free pages 0 1 File Header Extent Extents in SQL Server GAMs and SGAMs
  • 17. Tablespaces and Data files Oracle and SQL Server store data in data files The largest logical storage structure in Oracle is a tablespace The largest logical storage structure in SQL Server is a filegroup Tablespaces/filegroups are used to group application objects Tablespaces/filegroups optimize administration of data files
  • 18. SQLServer Data Files Three file types supported by SQL Server: Primary Data Files Secondary Data Files Log Data Files
  • 19. Mapping ofTablespaces and Filegroups System Tablespace SysAux Tablespace Temporary Tablespace BigFile Tablespace User DataTablespace User Index Tablespace UndoTablespace Redo Log Files Master DB Resource DB TempDB Model DB MSDB User DB Data FG Index FG Log File(s) Oracle Database Instance SQL Server Instance Data file Data fileData file Data fileData file Tablespace Group Data fileData file Data fileData file Data fileData file Data fileData file Data fileData file Redo Log Redo Log Redo Log Log fileData file Log fileData file Log fileData file Log fileData file User Database Data fileData file Data fileData file Log file Log fileData file
  • 20. Logging Model Oracle uses online redo logs to record changes made to the database by transactions and undo segments to capture the ‘before image’ of data SQL Server implements both of these functions using transaction logs. Each transaction record contains the undo and redo image of the transaction.
  • 21. Data Dictionary In Oracle the data dictionary is stored under the SYS schema in the SYSTEM tablespace In SQL Server the data dictionary consists of: ◦ CatalogView—the best way to access system metadata ◦ Backward CompatibilityViews—All system tables from previous releases are provided as backward compatibility views ◦ Dynamic ManagementViews—to view the current state of the SQL Server system. Provide real-time snapshots of internal memory structures indicating the server state. ◦ INFORMATION_SCHEMA views—SQL-99 method to view system metadata SQL Server’s Resource database contains the metadata for system stored procedures