• Aucun résultat trouvé

Microsoft SQL Server Microsoft SQL Server Administration for SAP Administration for SAP SQL Server Architecture SQL Server Architecture

N/A
N/A
Protected

Academic year: 2022

Partager "Microsoft SQL Server Microsoft SQL Server Administration for SAP Administration for SAP SQL Server Architecture SQL Server Architecture"

Copied!
35
0
0

Texte intégral

(1)

Microsoft SQL Server

Microsoft SQL Server

Administration for SAP

Administration for SAP

SQL Server Architecture

SQL Server Architecture

(2)

Overview Overview

SQL Server ArchitectureSQL Server Architecture

SQL Server with SAPSQL Server with SAP

Performance Monitoring and TuningPerformance Monitoring and Tuning

Administration and TroubleshootingAdministration and Troubleshooting

Database Backup and RestoreDatabase Backup and Restore

(3)

Database Server Database Server

Relational Database Management System SQL Server

Transact-SQL Transact-SQL Transact-SQL Transact-SQL Application

Application

Client

Results Results Results Results

(4)

SQL Server Service

SQL Server Service

(5)

Client / Server Client / Server

Application Application

Database Interface Database Interface

Network Library Network Library

SQL Server SQL Server

Open Data Services Open Data

Services

Network Library Network Library

Tabular Data Stream (TDS) Tabular Data Stream (TDS)

Client Server

(6)

SQL Server Client Network SQL Server Client Network

Utility

Utility

(7)

SQL Server Network Utility

SQL Server Network Utility

(8)

SQL Server Client Tools SQL Server Client Tools

SQL Enterprise ManagerSQL Enterprise Manager

SQL Query AnalyzerSQL Query Analyzer

Service ManagerService Manager

Server & Client Network UtilityServer & Client Network Utility

Performance MonitorPerformance Monitor

SQL ProfilerSQL Profiler

Index Tuning WizardIndex Tuning Wizard

(9)

Configuring SQL Enterprise Configuring SQL Enterprise

Manager

Manager

(10)

Threads and Fibers Threads and Fibers

SQL Server process maintains pool SQL Server process maintains pool of threads to process client requests of threads to process client requests

SQL Server can also be configured SQL Server can also be configured to use lightweight pooling(fibers)

to use lightweight pooling(fibers)

max worker threadsmax worker threads

(11)

Databases Databases

System Databases

User Databases

master master

model

model tempdbtempdb msdbmsdb

pubspubs northwindnorthwind VIEVIE

distribution distribution

(12)

Database Files Database Files

Extent (8

contiguous 8-KB

Page (8 Tables,

Indexes

Data

Database Database

Data (file)

.mdf or .ndf

Data (file)

.mdf or .ndf Log (file)

.ldf

Log (file)

.ldf

(13)

Data Files Data Files

FilegroupsFilegroups

Data & log files autogrowData & log files autogrow

Proportional fillProportional fill

Pages and ExtentsPages and Extents

GAMGAM

SGAMSGAM

PFSPFS

(14)

Storage Engine Storage Engine

Data Cache & Proc cacheData Cache & Proc cache

Cache hit ratio / free buffersCache hit ratio / free buffers

Transaction logTransaction log

Lazy WriterLazy Writer

Lock ManagerLock Manager

Log WriterLog Writer

Checkpoint / log truncationCheckpoint / log truncation

(15)

Hardware Configuration Hardware Configuration

Balance and push the bottleneck to Balance and push the bottleneck to expensive component

expensive component

CPU and L2 cacheCPU and L2 cache

MemoryMemory

Hard and Soft PagingHard and Soft Paging

System Area NetworksSystem Area Networks

Support of SAN Network InterfacesSupport of SAN Network Interfaces

cLan from GigaNetcLan from GigaNet

(16)

I/O components - Disks I/O components - Disks

How fast is a disk? How fast is a disk?

Depends on the type of I/O workloadDepends on the type of I/O workload

SQL Server reads 8K random SQL Server reads 8K random (page reads)

(page reads)

Singleton (or few) select/update/insertSingleton (or few) select/update/insert

Lazy writerLazy writer

Checkpoint processingCheckpoint processing

SQL Server reads 64K SQL Server reads 64K

sequential (extent reads)

sequential (extent reads)

(17)

I/O components - Disks I/O components - Disks

Max throughput ~10 MB/secMax throughput ~10 MB/sec

Max sequential transfers/sec ~150Max sequential transfers/sec ~150

Max random transfers/sec ~100Max random transfers/sec ~100

OLTP constrained by transfers/sec OLTP constrained by transfers/sec

DSS constrained by MB/secDSS constrained by MB/sec

Realistic transfer rates:Realistic transfer rates:I/O secI/O sec 8K8K 64K64K

Sequential I/O

Sequential I/O 150150 1.2 MB/sec1.2 MB/sec 9.4 MB/sec9.4 MB/sec Random I/O

Random I/O 100100 0.8 MB /sec0.8 MB /sec 6.3 MB/sec6.3 MB/sec

(18)

Hardware Configuration Hardware Configuration

DiskDisk

Raid 0, 10, 5Raid 0, 10, 5

Pagefile, tempdb, log and data files Pagefile, tempdb, log and data files location

location

h/w bandwidth limitationsh/w bandwidth limitations

Disk queue lengthDisk queue length

Write caching controllersWrite caching controllers

Latch wait timeLatch wait time

(19)

Fixed RID Fixed RID

Row Identifiers Row Identifiers

Base table organizations Base table organizations

Fixed Row Identifier (RID)Fixed Row Identifier (RID)

Rows identified by RID Rows identified by RID

(8 bytes consisting of File#, (8 bytes consisting of File#,

Page#, Slot#) Page#, Slot#)

RIDs do not change unless RIDs do not change unless a row is deleted and

a row is deleted and reinserted elsewhere reinserted elsewhere

RIDs can be reused once RIDs can be reused once the transaction that deletes the transaction that deletes

a row commits a row commits

RIDs used as lock resourceRIDs used as lock resource

(20)

Clustered index Clustered index

Clustered indexClustered index

Rows identified by Rows identified by unique clustering key unique clustering key

Clustering key used Clustering key used as lock resource

as lock resource

Row Identifiers Row Identifiers

Base table organizations

Base table organizations

(21)

Secondary index Secondary index

KeyKey Locator”Locator”

Points to either Points to either

Secondary Indexes Secondary Indexes

Secondary indicesSecondary indices

Index terms consist Index terms consist of key, “locator”

of key, “locator”

pairs pairs

Locators are stable Locators are stable with respect to base with respect to base

table organization table organization

(unlike 6.X) (unlike 6.X)

Locator may be Locator may be either RID (Fixed either RID (Fixed

RID) or clustering RID) or clustering

key (clustered index) key (clustered index)

(22)

Adams Adams

66 66 LewisLewis 11 SmithSmith 1111

Clustering index data Clustering index data

11 LewisLewis DanDan ...... AdamsAdams KimKim ...... 1111 SmithSmith KenKen 66

Adams Adams

Index Changes Index Changes

Secondary index lookup on key “Adams”

Secondary index lookup on key “Adams”

(23)

Index on Views Index on Views

Create View with SCHEMABINDINGCreate View with SCHEMABINDING

Create Unique Clustered Index on Create Unique Clustered Index on ViewView

All Nonclustered Indexes are All Nonclustered Indexes are dropped if Clustered Index is dropped if Clustered Index is

dropped dropped

Indexed Views are maintained Indexed Views are maintained automatically

automatically

(24)

Referring to SQL Server Referring to SQL Server

Objects Objects

Fully Qualified NamesFully Qualified Names

Partially Specified NamesPartially Specified Names

Server defaults to local serverServer defaults to local server

Database defaults to current databaseDatabase defaults to current database

Owner defaults to the user name in the Owner defaults to the user name in the database

database

pubs.dbo.authors

(25)

System Tables System Tables

Store Information (Metadata) About Store Information (Metadata) About the System and Database Objects the System and Database Objects

Database Catalog Stores Metadata Database Catalog Stores Metadata About a Specific Database

About a Specific Database

System Catalog Stores Metadata System Catalog Stores Metadata About the Entire System and All About the Entire System and All

Other Databases Other Databases

(26)

Metadata Retrieval Metadata Retrieval

System Stored ProceduresSystem Stored Procedures

sp_help authorssp_help authors

System FunctionsSystem Functions

select getdate()select getdate()

Information Schema ViewsInformation Schema Views

select * FROM select * FROM

(27)

Common System Procedures Common System Procedures

and System Tables and System Tables

System stored proceduresSystem stored procedures

sp_help, sp_helpindexsp_help, sp_helpindex

sp_helpdb, sp_helpfile/filegroupsp_helpdb, sp_helpfile/filegroup

sp_who, sp_locksp_who, sp_lock

sp_depends, sp_recompilesp_depends, sp_recompile

sp_readerrorlogsp_readerrorlog

System tablesSystem tables

sysobjects, sysindexes, sysprocessessysobjects, sysindexes, sysprocesses

(28)

Login Authentication, Login Authentication, Database User Accounts Database User Accounts

Windows NT

Verifies Password Windows NT

Verifies Password

SQL Server

SQL Server SQL Server

SQLSQL Windows NT

Windows NT

SQL Server Assigns Logins to User Accounts and Roles

SQL Server Assigns Logins to User Accounts and Roles

Database User Account Database

User Account

Windows NT Group User Windows NT Group User

SQL Server

(29)
(30)

Server Properties

Server Properties

(31)

Server Properties

Server Properties

(32)

Database Properties

Database Properties

(33)

Installing SQL Server Installing SQL Server

Installation PathInstallation Path

Character Set and Sort OrderCharacter Set and Sort Order

CollationsCollations

Network SupportNetwork Support

SQL Server Service AccountSQL Server Service Account

Licensing ModeLicensing Mode

Instance NameInstance Name

SQL Server 2000 onlySQL Server 2000 only

(34)

Lab work Lab work

Install SQL ServerInstall SQL Server

Start and Stop SQL Server ServiceStart and Stop SQL Server Service

Register your server with SQL Register your server with SQL Enterprise Manager

Enterprise Manager

Search a Topic in Books OnlineSearch a Topic in Books Online

Online help for Create TableOnline help for Create Table

Create a Table with Clustered IndexCreate a Table with Clustered Index

Check at the Server and Database Check at the Server and Database

(35)

Summary Summary

Write a summary for this moduleWrite a summary for this module

Références

Documents relatifs

What you need to know is that if you alter or build an index on a table that has data in it, and you don’t let SQL Server update the statistics on the table, then SQL Server could

This is a SQL Server–generated name for a primary key on the Employees table of the Accounting database, which we will create later in the chapter — the PK is for primary key (which

• Microsoft spatial data types provide SQL access to spatial data. Administering Your Microsoft SQL

including relational database server, full text indexing and search, XML data import and export, distributed and heterogeneous data integration, analysis server and client for

 Database with Integrated OLAP and Data Transformation Services (DTS).  Integration with the

• Ensure the domain account can run queries against the other server.. Lab

• Specify report, execution conditions, parameters, rendering Specify report, execution conditions, parameters, rendering format, delivery location, etc. format, delivery

SQL Server 2005 ofrece una plataforma de datos más confiable, segura y SQL Server 2005 ofrece una plataforma de datos más confiable, segura y productiva para aplicaciones de unidad