04 | Manage Data
05 | Implement Security
Click to edit
Master subtitle
style
Module 6 Overview
What Is High Availability?
Replication
Log Shipping
Mirroring
AlwaysOn
Failover Clustering
Topic: Replication
Topic: Replication
The Basics
Types of Replication
Implementing Replication
Replication Strengths and Weaknesses
The Basics
Publisher / distributor / subscriber
Publication type
Select DB and article(s)
Types of Replication
Snapshot
Transactional
Transactional with
updateable
subscriptions
Merge
Implementing Replication
Multiple destinations
Separate IP subnets
Multiple job schedules
Multiple shared
folders
Witness optional
Manual failover
Weaknesses
Manual client failover
Protects only data; does not protect schema, system tables and so
on
Can be difficult to repair
Configured on a per-database basis
DEMO
Implementing Replication
The Basics
Protects one user database at a
time
Uses a scheduled log backup job
of the primary database from
the primary server
Each secondary server uses a
scheduled file copy job to place
log backups nearby
Each secondary server uses a
scheduled log restore job to
restore to its secondary
database copy
Provides limited read-only
access to secondary database
copies
sp_Add_Log_Shipping_Primary_Database
sp_Add_Job_Schedule
sp_Add_Log_Shipping_Secondary_Database
sp_Add_Log_Shipping_Alert_Job
sp_Add_Log_Shipping_Primary_Secondary
sp_Add_Log_Shipping_Secondary_Primary
Failover Basics
Copy transaction log backups (if available)
Backup up primary database log with NORECOVERY
Restore primary database log on secondary server
with RECOVERY
Disable log shipping jobs
Configure log shipping on new primary server
Strengths
Weaknesses
Manual failover
Configured on a per-database basis
Cant protect Master
DEMO
Implementing Log Shipping
Topic: Mirroring
Topic: Mirroring
The Basics
Configuration Options
Handling Failover
Mirroring Strengths and Weaknesses
The Basics
User database transactions
are live shipped to a single
secondary and applied
synchronously or
asynchronously
Depending on configuration,
database failover and
recovery can occur within ten
seconds with automatic client
redirection
Scope of protectionsingle
user database at a time
Configuration Options
Single mirror database copy
Three major configurations
High safety with automatic
failover
Witness required
Weaknesses
Deprecated
Requires three servers in high-availability mode
Cannot query the mirrored database unless database snapshots are
implemented
Configured on a per-database basis
Does not protect system databases
DEMO
Implementing Database Mirroring
Topic: AlwaysOn
Topic: AlwaysOn
The Basics
Implementing AlwaysOn
AlwaysOn Failover
AlwaysOn Strengths and Weaknesses
The Basics
New feature in SQL Server 2012
Provides a failover environment for a set of databases that fail
together
A collection of primary replica databases support read-write
connections
A collection of secondary replica databases (up to four) support readonly connections
Requires a Windows Server failover
cluster
Synchronous-commit
and asynchronous-commit modes
Planned and automatic failover with
Implementing AlwaysOn
Each instance hosting an availability group must be a Windows Server (Enterprise
Edition) failover clustering node
Same collation on each instance
Enable the AlwaysOn availability groups feature on each instance (SQL Server
Configuration Manager or Windows PowerShell)
Run the new Availability Group Wizard
AlwaysOn Failover
Three failover modes
Automatic failover (without data loss)
Planned manual failover (without data loss)
Forced manual failover (with possible data loss)
During the failover, the failover target takes over the primary role,
recovers its databases, and brings them online as the new primary
databases
The former primary replica, when available, switches to the secondary
role, and its databases become secondary databases
The form(s) of failover that a given availability replica supports is
specified by the failover mode property
Synchronous-commit replicas
Asynchronous-commit replicas
Weaknesses
Complex
The Basics
Provides protection in the event of a catastrophic hardware
(server) failure
Requires the Windows Server Failover Cluster service
Only supports cluster-aware services or applications such as
Microsoft SQL Server or Microsoft Exchange Server
Requires shared disk storage (Fibre Channel or iSCSI)
Clients connect to a virtual name hosted by one of the nodes
in the cluster
Provides instance-level availability with automatic and
manual failover
Node majority
Node and file share majority
Node and disk majority
Disk only
Strengths
Weaknesses
2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered
trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of
Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a
commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT
MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.