67
데데데데데데 데데데데 데데 데데데데데데 데데데데 데데 Microsoft Microsoft SQL Server 2005 SQL Server 2005 데데 데 데데데데 데데 데 데데데데 데데 데데 데 데 데 데데 데 데 데 데데 ( ( [email protected]) [email protected]) IT Evangelist IT Evangelist Developer & Platform Evangelism Developer & Platform Evangelism ( ( ) ) 데데데데데데데데데 데데데데데데데데데

데이터베이스 관리자를 위한 Microsoft SQL Server 2005 관리 및 유지보수 도구

  • Upload
    haven

  • View
    109

  • Download
    0

Embed Size (px)

DESCRIPTION

데이터베이스 관리자를 위한 Microsoft SQL Server 2005 관리 및 유지보수 도구. 이 상 옥 차장 ( [email protected]) IT Evangelist Developer & Platform Evangelism ( 주 ) 한국마이크로소프트. 목차. 설치 : SQL Server 2005 SQL Server 2005 관리자 도구 모니터링 : SQL Server 2005 데이터베이스 유지보수 SQL Server 2005 보안 재난복구 데이터 가용성 복제. - PowerPoint PPT Presentation

Citation preview

Page 1: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

데이터베이스 관리자를 위한 데이터베이스 관리자를 위한 Microsoft SQL Server 2005Microsoft SQL Server 2005 관리 관리 및 유지보수 도구및 유지보수 도구

이 상 옥 차장이 상 옥 차장 (([email protected])[email protected])IT EvangelistIT Evangelist

Developer & Platform EvangelismDeveloper & Platform Evangelism

(( 주주 )) 한국마이크로소프트한국마이크로소프트

Page 2: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

목차목차

설치설치 : : SQL ServerSQL Server 2005 2005 SQL Server 2005SQL Server 2005 관리자 도구관리자 도구 모니터링모니터링 : : SQL Server 2005SQL Server 2005 데이터베이스 유지보수데이터베이스 유지보수 SQL Server 2005SQL Server 2005 보안보안 재난복구재난복구 데이터 가용성데이터 가용성 복제복제

Page 3: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

설치설치 : SQL Server 2005 : SQL Server 2005 새로운 기능 새로운 기능

Windows Installer Windows Installer SNAC SNAC 사용사용 (MDAC 9.0 (MDAC 9.0 대체대체 )) Feature TreeFeature Tree

트리 구조의 컴포넌트 설치 화면트리 구조의 컴포넌트 설치 화면 System Configuration Checker (SCC)System Configuration Checker (SCC)

설치 준비작업 진단설치 준비작업 진단 (WMI) Windows Management (WMI) Windows Management

Instrumentation Instrumentation 사용사용

Contd…

Page 4: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

하드웨어 요구사항하드웨어 요구사항 : : 최소최소

Hardware Hardware 32 Bit SQL Server 200532 Bit SQL Server 2005

ComputerComputer Intel or compatible Pentium 600 MHz or higher processor Intel or compatible Pentium 600 MHz or higher processor minimum; 1 GHz or higher recommendedminimum; 1 GHz or higher recommended

Memory (RAM) Memory (RAM) 256 MB minimum; 512 MB or more recommended 256 MB minimum; 512 MB or more recommended

Hard disk spaceHard disk space SQL Server database components: 95 to 300 MB, 250 MB SQL Server database components: 95 to 300 MB, 250 MB typicaltypical

Analysis Services: 50 MB minimum, 130 MB typicalAnalysis Services: 50 MB minimum, 130 MB typical

Reporting Services: 50 MB minimum for Report Server, 30 Reporting Services: 50 MB minimum for Report Server, 30 MB for Report Designer MB for Report Designer

Hardware Hardware 64 Bit SQL Server 200564 Bit SQL Server 2005

ComputerComputer Intel Itanium 2, AMD's Opteron, Intel Xeon EM64TIntel Itanium 2, AMD's Opteron, Intel Xeon EM64T

Memory (RAM) Memory (RAM) 1 GB minimum1 GB minimum

Page 5: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

SQL Server Editions (32 Bit)SQL Server Editions (32 Bit)

Standard EditionStandard Edition 클러스터링 지원 안됨클러스터링 지원 안됨 , indexed views, etc., indexed views, etc. 16 16 인스턴스 인스턴스 (( 라이센스 필요라이센스 필요 ))

Enterprise EditionEnterprise Edition 모든 기능 지원모든 기능 지원 , , 대용량 데이터베이스 용대용량 데이터베이스 용 50 50 인스턴스 인스턴스 (( 추가 라이센스 없음추가 라이센스 없음 ))

Developer EditionDeveloper Edition 개발자용으로 모든 기능제공하며 테스트 및 개발용도로 사용개발자용으로 모든 기능제공하며 테스트 및 개발용도로 사용

Express EditionExpress Edition 무상 배포용으로 클라이언트무상 배포용으로 클라이언트 , , 간단한 작업용으로 사용간단한 작업용으로 사용

Mobile EditionMobile Edition Smart DevicesSmart Devices 에 설치에 설치 메인 데이터베이스와 복제 및 동기화 지원메인 데이터베이스와 복제 및 동기화 지원

Page 6: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

SQL Server Editions (64 Bit)SQL Server Editions (64 Bit)

SQL Server 2005 Enterprise Edition (64-bit)SQL Server 2005 Enterprise Edition (64-bit) 모든 기능 지원모든 기능 지원 , , 대용량 및 고성능 데이터센터에 대용량 및 고성능 데이터센터에

사용사용

SQL Server 2005 Developer Edition (64-bit) SQL Server 2005 Developer Edition (64-bit) 모든 기능 지원모든 기능 지원 , , 개발자 용으로 테스트 및 개발에 개발자 용으로 테스트 및 개발에

사용사용

Page 7: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

SQL Server 2005SQL Server 2005 관리자 도구관리자 도구

SQL Server SQL Server Management StudioManagement Studio SQL Computer ManagerSQL Computer Manager sqlcmd sqlcmd 도구도구 SQL Management ObjectsSQL Management Objects

Page 8: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Integrated management and development environment

Based on Visual Studio .NET

Incorporates functionality of Enterprise Manager, Query Analyzer, and Analysis Manager in previous releases

Used to manage relational databases, Analysis Services, Reporting Services, andSQL Server CE databases

Includes tools for creating Transact-SQL, XMLA, MDX, and XQuery scripts

What Is SQL Server Management Studio?

Page 9: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Register a Server

Open Registered Servers windowOpen Registered Servers window11

Test the registered serverTest the registered server33Verify that the server appears under Registered ServersVerify that the server appears under Registered Servers44

Provide SQL Server instance detailsProvide SQL Server instance details22

Page 10: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is Object Explorer?

Window for browsing and managing objects

Object Explorer folders

Object Explorer buttons

Page 11: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Execute Transact-SQL Queries

Click New SQL Server QueryClick New SQL Server Query11

Click Execute and connect to SQL ServerClick Execute and connect to SQL Server33

Browse the resultsBrowse the results44

Type a Transact-SQL statementType a Transact-SQL statement22

Page 12: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is a SQL Server Management Studio Solution?

Collection of connections and queriesCollection of connections and queries

Project templatesProject templates

Page 13: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Create a SQL Server Management Studio Solution

Set the query properties Set the query properties 66

Type the Transact-SQL statementsType the Transact-SQL statements77

Create a new queryCreate a new query55

Save the projectSave the project88

Click File, New, ProjectClick File, New, Project11

Select the SQL Server Scripts templateSelect the SQL Server Scripts template22

Add a connectionAdd a connection33

Set the connection propertiesSet the connection properties44

Page 14: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is SQL Computer Manager?

Console snap-in for managing SQL Server services and connectivity

Icons: Services Server Network

Configuration Client Network

Configuration

Page 15: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is the sqlcmd Utility?

Command-line tool for executing Transact-SQL statements and scripts

Uses OLE DB to run Transact-SQL batches

Replaces osql

Enhancements over osql

Variables

Query server information

Passes error information to calling environment

Dedicated Administrator Connection

Commands

Page 16: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Use the sqlcmd Utility Interactively

Open a command prompt windowOpen a command prompt window11

Execute sqlcmdExecute sqlcmd22

Type Transact-SQL statements and sqlcmd commandsType Transact-SQL statements and sqlcmd commands33

Type GOType GO44

Type QUIT to close sqlcmdType QUIT to close sqlcmd55

Page 17: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Use the sqlcmd Utility Interactively

Open a command prompt windowOpen a command prompt window11

Execute sqlcmdExecute sqlcmd22

Type Transact-SQL statements and sqlcmd commandsType Transact-SQL statements and sqlcmd commands33

Type GOType GO44

Type QUIT to close sqlcmdType QUIT to close sqlcmd55

Page 18: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Use the sqlcmd Utility Interactively

Open a command prompt windowOpen a command prompt window11

Execute sqlcmdExecute sqlcmd22

Type Transact-SQL statements and sqlcmd commandsType Transact-SQL statements and sqlcmd commands33

Type GOType GO44

Type QUIT to close sqlcmdType QUIT to close sqlcmd55

Page 19: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

모니터링모니터링 : : SQL Server 2005SQL Server 2005

SQL ProfilerSQL Profiler DDL TriggersDDL Triggers Event NotificationsEvent Notifications Metadata ViewsMetadata Views

Page 20: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

SQL Profiler Enhancements in SQL Server 2005

Profiling Analysis ServicesProfiling Analysis Services

Tracing Showplan and deadlock eventsTracing Showplan and deadlock events

Saving results as XMLSaving results as XML

Aggregating dataAggregating data

Page 21: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Save a Trace as XML

Create and execute a traceCreate and execute a trace

File menu, Save As, Trace XML FileFile menu, Save As, Trace XML File

Specify name and location for fileSpecify name and location for file

Page 22: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Lesson: Using DDL Triggers

What Are DDL Triggers?

How to Create DDL Triggers

How to Manage DDL Triggers

Demonstration: Creating a DDL Trigger

Page 23: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Process:

What Are DDL Triggers?

UPDATE STATISTICS someTableUPDATE STATISTICS someTableDDL statement executedDDL statement executed11

Triggers to trap DDL statement execution

Database or server scope

DDL action performedDDL action performed22

Trigger firesTrigger fires33 EventDataEventData

Page 24: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Event Notifications?

Trap SQL Server events, including

DDL events

DML events

Trace events

Use Service Broker architecture to transmit events toa service

A message type and contract are predefined

Create a queue, a service, and a route

Page 25: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Querying Static Metadata

Provide information about database objects, for example:

Database files

Tables

Indexes

In <Database name>\Views\System Views folder

Directly query the system metadataUSE AdventureWorks

SELECT * FROM sys.tables

USE AdventureWorks

SELECT * FROM sys.tables

Page 26: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Querying Dynamic Metadata

Provide information about the current state of a server, for example:

Locks held

Threads

Memory usage

In <Database name>\Views\System Views folder

Directly query the system metadataSELECT * FROM sys.db_tran_locksSELECT * FROM sys.db_tran_locks

Page 27: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

데이터베이스 유지보수데이터베이스 유지보수

Managing IndexesManaging Indexes Database Tuning AdvisorDatabase Tuning Advisor

Page 28: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

ALTER INDEX … REBUILD …SELECT * FROM MyTable

CREATE INDEX …ON MyTable(…) WITH (ONLINE = ON)

CREATE INDEX …WITH (MAXDOP=3)

ALLOW_ROW_LOCKS = ONALLOW_PAGE_LOCKS = ON XMLIndex XML Column

SELECT column::query(…)FROM …

New Index Features in SQL Server 2005

ALTER INDEX statement

Online index operations

Parallel index operations

Locking options

Indexes with included columns

Partitioned indexes

XML indexes

Page 29: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is the Database Tuning Advisor?

WorkloadWorkload ResultsResults

.sql script

Databases

DTA

Table

.trc file

Page 30: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Use the Database Tuning Advisor

Create a new sessionCreate a new session11

Set tuning optionsSet tuning options33

Perform the analysisPerform the analysis44

Examine the resultsExamine the results55

Implement the recommendationsImplement the recommendations66

Specify the workloadSpecify the workload22

Page 31: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

SQL Server 2005SQL Server 2005 보안보안

SQL Server 2005 Security OverviewSQL Server 2005 Security Overview Managing SQL Server 2005 SecurityManaging SQL Server 2005 Security Managing PermissionsManaging Permissions Managing CertificatesManaging Certificates

Page 32: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Security Enhancements in SQL Server 2005

Password policy for SQL Server loginsPassword policy for SQL Server logins

Hierarchical security scopesHierarchical security scopes

Separation of user and schemaSeparation of user and schema

Limited metadata visibilityLimited metadata visibility

Declarative execution contextDeclarative execution context

Page 33: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Principals?

Principals

Server RoleSQL Server Login

Windows GroupDomain User AccountLocal User Account

UserDatabase RoleApplication RoleGroup

SQL ServerSQL Server

DatabaseDatabase

WindowsWindows

Permissions

Securables

Page 34: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Securables?

Principals

Server RoleSQL Server Login

Windows GroupDomain User AccountLocal User Account

UserDatabase RoleApplication RoleGroup

SQL ServerSQL Server

DatabaseDatabase

WindowsWindows

FilesRegistry Keys

Server

Schema

Database

Permissions

Securables

Page 35: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Permissions?

Principals

Server RoleSQL Server Login

Windows GroupDomain User AccountLocal User Account

UserDatabase RoleApplication RoleGroup

SQL ServerSQL Server

DatabaseDatabase

WindowsWindows

FilesRegistry Keys

CREATEALTERDROPCONTROLCONNECTSELECTEXECUTEUPDATEDELETEINSERTTAKE OWNERSHIPVIEW DEFINITIONBACKUP

Permissions

Securables

GRANT/REVOKE/DENYGRANT/REVOKE/DENY

ACL

Server

Schema

Database

Page 36: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Schemas?

dbo

Products(Server1.AdventureWorks.dbo.Products)

SalesData

Orders(Server1.AdventureWorks.SalesData.Orders)

Namespaces for database objectsNamespaces for database objects

Page 37: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Understanding Permissions

Assign permissions using:

Object Explorer in SQL Server Management Studio

Transact-SQLGRANT

REVOKEDENY

Can perform action if:

Permission granted to the principal or a collection containing principal

- AND -

Permission not denied to the principal or a collection containing principal

Page 38: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Manage Server Permissions

USE masterGRANT ALTER ANY DATABASE TO [SERVERX\Bill]USE masterGRANT ALTER ANY DATABASE TO [SERVERX\Bill]

In Object ExplorerIn Object Explorer

Connect to serverConnect to server11

Right-click login and click PropertiesRight-click login and click Properties22

Permissions page, click Add ObjectsPermissions page, click Add Objects33

Add the server <servername>Add the server <servername>44

Assign permissionsAssign permissions55

Page 39: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Certificates?

Digitally signed document containing a public/private key pair

Obtained from:

Certificate authority

Certificate server

Used for:

Authentication – a message signed by the private key is guaranteed to be sent by the owner of the certificate

Encryption – a message encrypted with a public key can only be decrypted with the matching private key, and vice versa

Page 40: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Manage Certificates

Creating certificatesCreating certificates

Exporting certificatesExporting certificates

Deleting certificatesDeleting certificates

CREATE CERTIFICATE AWCert WITH SUBJECT = 'CertificateForAdventureWorks' , ENCRYPTION_PASSWORD = 'P@ssw0rd'

CREATE CERTIFICATE AWCert WITH SUBJECT = 'CertificateForAdventureWorks' , ENCRYPTION_PASSWORD = 'P@ssw0rd'

DUMP CERTIFICATE AWCert TO FILE = 'C:\MyCert.cer' DUMP CERTIFICATE AWCert TO FILE = 'C:\MyCert.cer'

DROP CERTIFICATE AWCertDROP CERTIFICATE AWCert

Page 41: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

재난복구재난복구

Disaster Recovery in SQL Server 2005Disaster Recovery in SQL Server 2005 Using Database SnapshotsUsing Database Snapshots Backup and Restore OperationsBackup and Restore Operations

Page 42: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Disaster Recovery in SQL Server 2005

Database snapshotsDatabase snapshots

12:00 Snapshot

Online restore operationsOnline restore operations

Backup media mirroringBackup media mirroring

Improved verificationImproved verification

Checksum12345678

Checksum12345678

Checksum12345678

Database snapshotsDatabase snapshots

Online restore operationsOnline restore operations

Backup media mirroringBackup media mirroring

Improved verificationImproved verification

Page 43: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Are Database Snapshots?

12:00 Snapshot

Page

Page

Read-only, consistent view of a database

Specified point-in-time

Modifying data

Copy-on-write of affected pages

Reading data

Accesses snapshot if data has changed

Redirected to original database otherwise

Page 44: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Use a Database Snapshot to Recover Data

Scenario Example Code / Steps

Undeletingrows

Undoingan update

Recoveringa droppedobject

11 Script the object in the database snapshot

INSERT INTO Production.WorkOrderRoutingSELECT * FROM AdventureWorks_dbsnapshot_1800.Prod.WorkOrderRouting

INSERT INTO Production.WorkOrderRoutingSELECT * FROM AdventureWorks_dbsnapshot_1800.Prod.WorkOrderRouting

UPDATE HR.DepartmentSET Name = ( SELECT Name FROM AdventureWorks_dbsnapshot_1800.HR.Department WHERE DepartmentID = 1)WHERE DepartmentID = 1

UPDATE HR.DepartmentSET Name = ( SELECT Name FROM AdventureWorks_dbsnapshot_1800.HR.Department WHERE DepartmentID = 1)WHERE DepartmentID = 1

Caution: Not a substitute for a comprehensive backup and restore strategy

Execute the script in the source database22

Repopulate the object (if appropriate)33

Page 45: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Perform an Online Restore

Only in Enterprise Editions

Only for full or bulk-logged recovery models

By default, restoring a file or a page is automatically an online restore

Filegroup offline when any file within it is being restored

Database offline during restore of any files in the primary filegroup

Page 46: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Recover the master Database

If SQL Server instance is accessible

Start SQL Server in single-user mode

Restore your latest backup of the master database

Restart the server

If SQL Server instance is not accessible

Rebuild master database using Setup.exe

Restore master database

Restore msdb and model databases

11

22

33

11

22

33

Page 47: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

데이터베이스 가용성데이터베이스 가용성

Introduction to Data AvailabilityIntroduction to Data Availability Introduction to Database MirroringIntroduction to Database Mirroring

Page 48: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Introduction to Data Availability

Attribute Clustering Log

shippingDatabase mirroring

Failure detection Yes No No

Automatic failover Yes No Yes

Perceived downtime

30 seconds + recovery N/A 3 seconds

Potential data loss

Yes – one copy of data

Yes – latest transaction log

Yes – in some configurations

Masking of storage failure

No – shared disk Yes Yes

Special hardware

Certified storage and servers No No

Distance 100 miles Unlimited Unlimited

Scope System and user databases

User databases User databases

Page 49: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

What Is Database Mirroring?

Principal Database Mirror DatabaseClient

UpdateUpdate Update

Principal Database Mirror DatabaseClient

Page 50: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Server Roles in Database Mirroring

Server holding the principal database Users connect to this server

Server holding the principal database Users connect to this server

Principal server

Server holding the mirror database Users connect to this server only after failover

Server holding the mirror database Users connect to this server only after failover

Mirror server

Monitors connectivity between partners and initiates automatic failoverMonitors connectivity between partners and initiates automatic failover

Witness server

Page 51: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Mirror Sessions

Mirror server requests transaction log records—synchronizationMirror server requests transaction log records—synchronizationOn initiation

Principal server transmits log records as transactions occurPrincipal server transmits log records as transactions occur

During the session

Communications or server failure Database administrator

Communications or server failure Database administrator

Termination

Page 52: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Database Mirroring Configurations

ScenariosScenariosSynchronous with witness serverSynchronous with witness server

Asynchronous with witness serverAsynchronous with witness server

Synchronous without witness serverSynchronous without witness server

Principal failureAutomatic failover – mirror becomes principalOriginal principal recovered, becomes new mirror

Mirror failurePrincipal continuesSession in suspended state

Principal failureAutomatic failover – mirror becomes principalOriginal principal recovered, becomes new mirror

Mirror failurePrincipal continuesSession in suspended state

Principal failureDatabase unavailable – force service to mirrorOriginal principal recovered, becomes new mirror

Mirror failurePrincipal continuesSession in suspended state

Principal failureDatabase unavailable – force service to mirrorOriginal principal recovered, becomes new mirror

Mirror failurePrincipal continuesSession in suspended state

Principal failureDatabase unavailable – force service to mirrorOriginal principal recovered – resume session

Mirror failureDatabase unavailableOriginal mirror recovered – automatically available

Principal failureDatabase unavailable – force service to mirrorOriginal principal recovered – resume session

Mirror failureDatabase unavailableOriginal mirror recovered – automatically available

Page 53: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

복제복제

Overview of Replication EnhancementsOverview of Replication Enhancements New Types of ReplicationNew Types of Replication Configuring ReplicationConfiguring Replication

Page 54: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

User Interface Enhancements

Replication wizards

40% fewer pages

Improved default values and auto-detection

Less branching

New Subscription Wizard

Replaces the Push Subscription Wizard and Pull Subscription Wizard

Allows you to define multiple subscriptions with different properties at the same time

Page 55: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Replication Management

Initializing a subscriber

Backup and restore

Copying a database

Dynamic snapshots

Resuming snapshot transfers

Replicating DDL statements

Allowing anonymous subscriptions for all publications

Page 56: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Performance and Scalability

Precomputed partitions

Updates to unique keys

Transactional parallelism — independent agent option used by default

Download only articles — to reduce change tracking metadata

Reduced contention on reporting subscribers

Use snapshot isolation level

Use snapshots

Page 57: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Replication Monitor

Independent from SQL Server Workbench — passive monitoring

Define acceptable performance figures

Minimize monitoring impact

Merge replication

Article level statistics

Upload and download statistics

Transactional replication — real-time monitoring with tracer tokens

Page 58: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Other Enhancements

Merge replication concurrency enhancements — guaranteed delivery of logical records

Programming changes — release of RMO

Replication of more types of objects

.NET UDTs

Assemblies

Page 59: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Heterogeneous Replication

Use Oracle v8 and later databases as the publisher in a replication system

Snapshot replication — no impact on Oracle database

Transactional replication

Triggers and tracking tables added to Oracle database

Log Reader Agent transfers changes to SQL Server Distributor and Distribution Agent transfers changes to subscribers

Potential issues because of:

Differences between SQL Server and Oracle

Use of Oracle tools

Page 60: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

Peer-to-Peer Transactional Replication

Log Reader Agent

DistributionAgent

SydneySydney

Log Reader Agent

DistributionAgent

New YorkNew York

Log Reader Agent

DistributionAgent

LondonLondon

Log Reader Agent

DistributionAgent

New YorkNew York

Page 61: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

HTTP Replication

Subscriber Firewall IIS Publisher

https://Repl.AdventureWorks.com

XML over HTTP/HTTPS Binary over TCP/IP

Page 62: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

How to Configure Replication Using RMO

Reference the SMO and RMO libraries

Microsoft.SqlServer.ConnectionInfo

Microsoft.SqlServer.Replication

Import the SMO and RMO namespaces

Connect to the replications server(s)

Perform replication tasks

Create publications

Create subscriptionsImports Microsoft.SqlServer.Management.CommonImports Microsoft.SqlServer.ReplicationImports Microsoft.SqlServer.Management.CommonImports Microsoft.SqlServer.ReplicationDim subCon As ServerConnectionsubCon = New ServerConnection("MySubscriber")subCon.Connect()

Dim subCon As ServerConnectionsubCon = New ServerConnection("MySubscriber")subCon.Connect()

11

33

44

22

Page 63: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

세션 요약세션 요약

설치설치3232 비트비트 , 64, 64 비트비트

SQL Server 2005SQL Server 2005 관리자 도구관리자 도구 통합 관리도구통합 관리도구 VS.NET VS.NET 연동연동

모니터링모니터링 : : ProfilerProfiler, DDL,, DDL, 이벤트 이벤트 데이터베이스 유지보수 데이터베이스 유지보수 – – 인덱스인덱스 , , 튜닝 튜닝 보안 보안 - - 데이터데이터 , , 서비스서비스 재난복구 재난복구 - - 스냅샷스냅샷 데이터 가용성 데이터 가용성 - - 미러링미러링 복제 복제 – – P2P, HTTP P2P, HTTP 방식 방식

Page 64: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

참고참고 자료자료

웹 문서웹 문서 :: An Overview of SQL Server 2005 Beta 2 for the Database An Overview of SQL Server 2005 Beta 2 for the Database

AdministratorAdministratorhttp://www.microsoft.com/technet/prodtechnol/sql/2005/maintain/http://www.microsoft.com/technet/prodtechnol/sql/2005/maintain/sqlydba.mspxsqlydba.mspx

Improving Performance with SQL Server 2005 Indexed Improving Performance with SQL Server 2005 Indexed ViewsViewshttp://www.microsoft.com/technet/prodtechnol/sql/2005/http://www.microsoft.com/technet/prodtechnol/sql/2005/ipsql05iv.mspxipsql05iv.mspx

Beta 2 Demo:Beta 2 Demo:

http://www.microsoft.com/sql/2005/productinfo/demos/default.asphttp://www.microsoft.com/sql/2005/productinfo/demos/default.asp

Page 65: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

추천서적추천서적 : : Microsoft PressMicrosoft PressIT IT 전문가를 위한 고급 정보전문가를 위한 고급 정보

최신 기술서적에 대한 정보는 여기서 참조하세요 .

www.microsoft.com/learning/books/

Page 66: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

이 서적은 국내 대형서점 또는 온라인 서점에서 판매됩니다 .

추천서적추천서적 : : IT IT 전문가를 위한 참고서적전문가를 위한 참고서적

Page 67: 데이터베이스 관리자를 위한  Microsoft SQL Server 2005 관리 및 유지보수 도구

MicrosoftMicrosoft 교육센터교육센터IT IT 전문가를 위한 교육정보전문가를 위한 교육정보

코스코스 제목제목 기간기간

27332733 Updating Your Database Administration Updating Your Database Administration Skills to Microsoft SQL Server 2005Skills to Microsoft SQL Server 2005 3 3 일일

27342734 Updating Your Database Development Updating Your Database Development Skill to Microsoft SQL Server 2005Skill to Microsoft SQL Server 2005 3 3 일일

자세한 교육정보는 Microsoft 공식 교육기관 또는 인터넷에서 통해서

얻을 수 있습니다 .

www.microsoft.com/learning