Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
Logging Model
Data Dictionary
Schema and Data Structures (Objects)
Oracle SQL Server
Table Table
Index Index
View View
Synonym Synonym
Schema – a collection of objects
Sequence Identity Columns
owned by a database user
Procedure Stored Procedure
Schemas in SQL Server provide Function Function
logical separation of objects, Package N/A
similar to Oracle’s schema Queue in Streams Advanced Queuing Service Broker Queue
Object Type Type
XML DB XML Schema Collection
Data File Data File Data File Data File Data File Data File
Smallest unit of
Block Page
logical storage
Allocation
block block block 6 x 2K
block
= 12K block block block block
2K 2K 2K EXTENT
2K 8K 8K 8K 8 x 8K2K= 64K
block block block block 12K + 16K = 28K block block block EXTENT
block
2K 2K 2K 2K SEGMENT 8K 8K 8K 2K 64K + 64K =
block block block block (Table/Index) block block block block 128K
HEAP/INDEX
2K 2K 2K 2K 8K 8K 8K 2K
block block block block block block block block
2K 2K 2K 2K 8K 8K 8K 2K
block block block block block block block block
2K 2K 8 x 2K
2K= 16K 2K 8K 8K 8K 8 x 8K2K= 64K
block block EXTENT
block block block block block EXTENT
block
2K 2K 2K 2K 8K 8K 8K 2K
block block block block block block block block
2K 2K 2K 2K 8K 8K 8K 2K
block block block block block block block block
Extents in
SQL Server
SysAux Tablespace Data file Data file Data file Log file
Resource DB
Tablespace Group
Temporary Data file Log file TempDB
Data file Data file
Tablespace Model DB
Data file Log file
User Database
User DB
User Index Data file Data file Data file Data file
Tablespace Data FG
Undo Tablespace Data file Data file Data file Data file Index FG