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

SQL Server Architecture

The document provides an overview of Microsoft SQL Server Administration for SAP, covering key topics such as SQL Server architecture, performance monitoring, administration, and troubleshooting. It discusses various components including client-server interactions, database structures, and hardware configurations. Additionally, it outlines installation procedures and common system procedures for effective database management.

Uploaded by

Makv2lis
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SQL Server Architecture

The document provides an overview of Microsoft SQL Server Administration for SAP, covering key topics such as SQL Server architecture, performance monitoring, administration, and troubleshooting. It discusses various components including client-server interactions, database structures, and hardware configurations. Additionally, it outlines installation procedures and common system procedures for effective database management.

Uploaded by

Makv2lis
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Microsoft SQL Server

Administration for SAP

SQL Server Architecture


Overview
 SQL Server Architecture
 SQL Server with SAP
 Performance Monitoring and Tuning
 Administration and Troubleshooting
 Database Backup and Restore

2
Database Server

Results
Results

Transact-SQL
Transact-SQL
Application
Application
Client SQL Server
Relational Database
Management System

3
SQL Server Service

4
Client / Server

Client Server
Application
Application SQL
SQLServer
Server
Open
OpenData
Data
Database
DatabaseInterface
Interface Services
Services
Network
NetworkLibrary
Library Network
NetworkLibrary
Library

Tabular Data Stream (TDS)

5
SQL Server Client Network
Utility

6
SQL Server Network Utility

7
SQL Server Client Tools
 SQL Enterprise Manager
 SQL Query Analyzer
 Service Manager
 Server & Client Network Utility
 Performance Monitor
 SQL Profiler
 Index Tuning Wizard
 Data Transformation Services
8
Configuring SQL Enterprise
Manager

9
Threads and Fibers
 SQL Server process maintains pool
of threads to process client requests

 SQL Server can also be configured


to use lightweight pooling(fibers)

 max worker threads

10
Databases

System Databases
master
model tempdb msdb distribution

pubs northwind VIE

User Databases

11
Database Files

Database

Data
Data(file)
(file) Log
Log(file)
(file)
.mdf
.mdf or
or .ndf
.ndf .ldf
.ldf

Tables, Indexes Extent


(8 contiguous
8-KB pages)
Data Page (8 KB)
Max row size = 8092 bytes

12
Data Files
 Filegroups
 Data & log files autogrow
 Proportional fill
 Pages and Extents
 GAM
 SGAM
 PFS
 IAM
 In row text
13
Storage Engine
 Data Cache & Proc cache
 Cache hit ratio / free buffers
 Transaction log
 Lazy Writer
 Lock Manager
 Log Writer
 Checkpoint / log truncation
 Background task
14
Hardware Configuration
 Balance and push the bottleneck to
expensive component
 CPU and L2 cache
 Memory
 Hard and Soft Paging
 System Area Networks
 Support of SAN Network Interfaces
 cLan from GigaNet
 Servernet II from Compaq
 20% perf gain 15
I/O components - Disks
 How fast is a disk?
 Depends on the type of I/O workload
 SQL Server reads 8K random
(page reads)
 Singleton (or few) select/update/insert
 Lazy writer
 Checkpoint processing
 SQL Server reads 64K
sequential (extent reads)
 Table and index scans
 Backup, index creation, DBCC, etc… 16
I/O components - Disks
 Max throughput ~10 MB/sec
 Max sequential transfers/sec ~150
 Max random transfers/sec ~100
 OLTP constrained by transfers/sec
 DSS constrained by MB/sec
I/O sec 8K 64K
 Realistic transfer rates:
Sequential I/O 150 1.2 MB/sec 9.4 MB/sec
Random I/O 100 0.8 MB /sec 6.3 MB/sec

17
Hardware Configuration
 Disk
 Raid 0, 10, 5
 Pagefile, tempdb, log and data files
location
 h/w bandwidth limitations
 Disk queue length
 Write caching controllers
 Latch wait time

18
Row Identifiers
Base table organizations
 Fixed Row Identifier (RID)
 Rows identified by RID
Fixed RID (8 bytes consisting of File#,
Page#, Slot#)
 RIDs do not change unless
a row is deleted and
reinserted elsewhere
 RIDs can be reused once
the transaction that deletes
a row commits
 RIDs used as lock resource

19
Row Identifiers
Base table organizations
 Clustered index
Clustered index
 Rows identified by
unique clustering key
 Clustering key used
as lock resource

20
Secondary Indexes
 Secondary indices
Secondary index
 Index terms consist
of key, “locator”
pairs
 Locators are stable
Key “Locator”
with respect to base
table organization
Points to either (unlike 6.X)
 Locator may be
either RID (Fixed
RID) or clustering
key (clustered index)
 Unique key/locator
pair used as lock
resource
21
Index Changes
Secondary index lookup on key “Adams”

Adams

6
Adams 6 Lewis 1 Smith 11

1 Lewis Dan ... 6 Adams Kim ... 11 Smith Ken

Clustering index data


Key
Locator (clustering Key)
22
Index on Views
 Create View with SCHEMABINDING
 Create Unique Clustered Index on
View
 All Nonclustered Indexes are
dropped if Clustered Index is
dropped
 Indexed Views are maintained
automatically
 SET Options
 EXPAND VIEWS and NOEXPAND 23
Referring to SQL Server
Objects
 Fully Qualified Names
 Partially Specified Names
 Server defaults to local server
 Database defaults to current database
 Owner defaults to the user name in the
database
pubs.dbo.authors

24
System Tables
 Store Information (Metadata) About
the System and Database Objects
 Database Catalog Stores Metadata
About a Specific Database
 System Catalog Stores Metadata
About the Entire System and All
Other Databases

25
Metadata Retrieval
 System Stored Procedures
 sp_help authors

 System Functions
 select getdate()

 Information Schema Views


 select * FROM
INFORMATION_SCHEMA.TABLES
26
Common System Procedures
and System Tables
 System stored procedures
 sp_help, sp_helpindex
 sp_helpdb, sp_helpfile/filegroup
 sp_who, sp_lock
 sp_depends, sp_recompile
 sp_readerrorlog
 System tables
 sysobjects, sysindexes, sysprocesses
 System functions
 Object_name/id, index_col 27
Login Authentication,
Database User Accounts
SQL
SQLServer
ServerAssigns
AssignsLogins
Logins
Windows Windows
WindowsNT NT to
toUser
UserAccounts
Accountsand
andRoles
Roles
WindowsNT
NT
Group Verifies
VerifiesPassword
Password
GroupUser
User

Windows
WindowsNT
NT
Database
Database
User
UserAccount
Account
SQL
SQL
SQLServer
Server

SQL
SQLServer
Server SQL Server
Login
LoginAccount
Account Verifies Password
Database
DatabaseRole
Role
28
29
Server Properties

30
Server Properties

31
Database Properties

32
Installing SQL Server
 Installation Path
 Character Set and Sort Order
 Collations
 Network Support
 SQL Server Service Account
 Licensing Mode
 Instance Name
 SQL Server 2000 only
 Only Clients needs to be installed on
Application Server 33
Lab work
 Install SQL Server
 Start and Stop SQL Server Service
 Register your server with SQL
Enterprise Manager
 Search a Topic in Books Online
 Online help for Create Table
 Create a Table with Clustered Index
 Check at the Server and Database
Properties
34
Summary
 Write a summary for this module

35

You might also like