Madsqlserver

32
Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara

Transcript of Madsqlserver

Page 1: Madsqlserver

Mecanismos de alta disponibilidad

con Microsoft SQL Server 2008

Por: ISC Lenin López Fernández de Lara

Page 2: Madsqlserver

Temario

Database Mirroring

Log Shipping

Replication

Failover Clustering

Demo

Page 3: Madsqlserver

1.1 Database Mirroring Roles

Page 4: Madsqlserver

1.2 Operating Modes

High Availability

High SafetyHigh

Performance

Page 5: Madsqlserver

1.2.1 High Availability Operating

Mode

synchronous

Automatic failover

Writes a

transaction to

th transaction

log

The

transaction is

first committed

on the mirror

database

Performance

impact

Uses simple ping

Page 6: Madsqlserver

1.2.2 High Performance Operating Mode

Asynchronou

s

No automatic

failover

Page 7: Madsqlserver

1.2.3 High Safety Operating

Mode

Synchronous

Manually failover

Writes a

transaction to

th transaction

log

The

transaction is

first committed

on the mirror

database

Performance

impact

Page 8: Madsqlserver

Log Shipping

¿What is?

Provides a means to maintain a secondary server

on an automated basis using a chain of transaction

log backups

Also allows you to configure a monitor server that

can verify the health

Page 9: Madsqlserver

1.1 Log Shipping Scenarios

OffloadingReportActivity

Initializationfor

DatabaseMirroring

Upgrading Versions or Migrating to

a New Platform

Primary or Secondary Availability Solution

Page 10: Madsqlserver

1.1.1 Offloading Report

Activity

Reportingserver

SELECT statements

StandbyMode

Page 11: Madsqlserver

1.1.2 Initialization for Database Mirroring

backups of theprincipal

principal and mirror are

synchronized

minimizesthe time

Page 12: Madsqlserver

1.1.3 Upgrading Versions or

Migrating to a New Platform

build the new instance

a brief outage on

the applications

move thedatabases

Page 13: Madsqlserver

1.1.4 Primary or Secondary

Availability Solution

Secondarydatabases

an outage of the

primary database

thatapplicationscan switch

Page 14: Madsqlserver

1.2 Log Shipping Components

Page 15: Madsqlserver

Replication

¿What is?

Replication is designed as a data-distribution

mechanism.

The core replication engine is designed for very

flexible implementation

The core architecture can be used to provide

availability for a database because a redundant

copy of data is maintained in synchronization with

a master copy

Page 16: Madsqlserver

1.1 Replication Components

• The basic building block of replication

• Can be defined against a table, view, stored procedure, or function

Articles

• Publications are groupings of articles that define the replication setPublications

• You can apply one or more filters to each article that restrict the set of data that is replicated.

• You can fi lter articles by rows or by columns

Filters

Page 17: Madsqlserver

1.2 Replication Roles

• Maintains the master copy of the data within a replication architecturepublisher

• Is the database that is receiving changes from the replication engine defined by the publication to which it is subscribing

subscriber

• Is the main engine within a replication architecture

• The distribution database is stored on the instance that is configured as the distributor (An instance of SQL).

distributor

Page 18: Madsqlserver

1.3 Replication Topologies

Central Publisher

OtherCentral

Subscriber

Page 19: Madsqlserver

1.3.1 Central Publisher

Topology

Page 20: Madsqlserver

1.3.2 Central Subscriber

Topology

Page 21: Madsqlserver

1.6 Replication Methods

SnapshotReplication

MergeReplication

TransactionalReplication

Page 22: Madsqlserver

1.6.1 Snapshot Replication

1. Snapshot Agent

extracts the

schema and BCPs

the data

2. Distribution Agent then

picks up and applies the

snapshot to each

subscriber (tables are

dropped and re-created,

then the data is copied

using BCP)

It is not

normally

used for high

availability

full replace of

data

Page 23: Madsqlserver

1.6.2 Transactional

Replication

Begins with an initial snapshot being applied to the

subscriber to ensure that the two databases are

synchronized

As subsequent transactions are issued against the

publisher, the replication engine applies them to the

subscriber.

Page 24: Madsqlserver

2.2 Transactional Options

Page 25: Madsqlserver

Merge Replication

¿What is?

Merge replication is another alternative that can be

applied to high-availability systems.

Merge replication was primarily designed for mobile,

disconnected users.

By translation, the mechanisms are already built in

for changes to occur at any location and get

synchronized, as well as to be able to withstand

failures and continue processing

Page 26: Madsqlserver

3.1 Change Tracking

(synchronize process)

MSmerge

_genhist

ory

MSmerge

_tombston

e

MSmerge

_genhist

ory

MSmerge

_tombston

e

Page 27: Madsqlserver

Windows Clustering

¿What is?

Windows clustering enables multiple pieces of

hardware to act as a single platform for running

applications.

Page 28: Madsqlserver

1.1 Windows Cluster

Components

Page 29: Madsqlserver

1.2 Types of Clusters

Standard Windows Cluster

MajorityNodeSet

Cluster

Page 30: Madsqlserver

2.2 Failover Cluster Instance Components

The components that you need to configure for a SQL

Server failover clustered instance are the following:

IP addresses

Network names

Disk drives on the shared drive array

SQL Server services

Service accounts

Page 31: Madsqlserver

Demo

Mirroring High Availability

Page 32: Madsqlserver

¿######?