+ All Categories
Home > Technology > SharePoint & SQL 2012 Availability Groups

SharePoint & SQL 2012 Availability Groups

Date post: 15-Jan-2015
Category:
Upload: thomas-vochten
View: 750 times
Download: 0 times
Share this document with a friend
Description:
Slides for my talk at SharePoint Saturday Netherlands 2013
Popular Tags:
41
SharePoint 2013 & SQL Server 2012 Availability Groups Thomas Vochten The Rough Guide
Transcript
Page 1: SharePoint & SQL 2012 Availability Groups

SharePoint 2013 & SQL Server 2012 Availability Groups

Thomas Vochten

The Rough Guide

Page 2: SharePoint & SQL 2012 Availability Groups
Page 3: SharePoint & SQL 2012 Availability Groups

About Me

Thomas Vochten

@thomasvochtenthomasvochten.comlinkedin.com/in/thomasvochten

SharePoint consultant. Platform architect. Speaker. Trainer. Accidental DBA.

SharePointSQL Server

Page 4: SharePoint & SQL 2012 Availability Groups

Agenda• Acronym Soup• Before SQL 2012• Availability Groups• Demonstration

Page 5: SharePoint & SQL 2012 Availability Groups

Acronym Soup

Setting the stage…

Page 6: SharePoint & SQL 2012 Availability Groups

HA• High Availability• Protecting against component failures:

operating system problemapplication pool crashwindows update gone badunplugged network cable…

Protection is typically automatic

Page 7: SharePoint & SQL 2012 Availability Groups

DR• Disaster Recovery• Protecting against catastrophic failures:

storage is downdatacenter power is outnetwork backbone is down…

Protection is typically manual

Page 8: SharePoint & SQL 2012 Availability Groups

RPO• Recovery Point Objective• How much data can you afford to lose?

Business decision!

Page 9: SharePoint & SQL 2012 Availability Groups

RTO• Recovery Time Objective• How fast do you want to be online again?

Business decision!

Page 10: SharePoint & SQL 2012 Availability Groups

RPO & RTO in Perspective

time

RPO RTO

last backup at 20:00 full recovery at 12:00outage at 08:00

12h 4h

Page 11: SharePoint & SQL 2012 Availability Groups

3 days, 15 hours

8 hours, 45 mins

52 mins, 34 secs5 mins, 15 secs

99%

99,9%

99,99%

99,999%

downtime per year

SLA• Number of nines

Page 12: SharePoint & SQL 2012 Availability Groups

Before SQL 2012

Page 13: SharePoint & SQL 2012 Availability Groups

Failover Clustering• Tried and true technique• Evolved over time• Typically shared storage• Instance level protection• Automatic failover• Can do multi site without shared storage

Transparent for SharePoint

Page 14: SharePoint & SQL 2012 Availability Groups

Mirroring• Introduced in SQL 2005 SP1• Deprecated with SQL 2012• No shared storage• Synchronous mode (high safety)• Asynchronous mode (high performance)• Automatic failover possible• Configured per database

Pre-SharePoint 2010: use sql aliasesSharePoint 2010/2013: native support

Page 15: SharePoint & SQL 2012 Availability Groups

SharePoint & Mirroring• PowerShell

$db = Get-SPDatabase [UglyGuidGoesHere]$db.AddFailoverServiceInstance(“servername”)$db.Update()

• User Interface

Page 16: SharePoint & SQL 2012 Availability Groups

Log Shipping• Introduced in SQL 2000• Very reliable (backup / restores)• Configured per database• Multiple secondaries• Readable secondaries• Failover is manual

Typically for SharePoint standby farms

Page 17: SharePoint & SQL 2012 Availability Groups

Common Topologies

© Microsoft TechNet

Page 18: SharePoint & SQL 2012 Availability Groups

Other Techniques• SQL Replication• Backup/Restore• SAN Replication

Page 19: SharePoint & SQL 2012 Availability Groups

Availability Groups

Page 20: SharePoint & SQL 2012 Availability Groups

SQL 2012 AlwaysOn• AlwaysOn Failover Cluster Instances• AlwaysOn Availability Groups

Both techniques are based upon Windows Server Failover Clustering (WSFC)

Page 21: SharePoint & SQL 2012 Availability Groups

AG Concepts• Availability Group• Availability Replica• Availability Database• Availability Group Listener

Page 22: SharePoint & SQL 2012 Availability Groups

Introducing AG• Mirroring done better• Protects groups of databases• Requires a WSFC for resource management• Up to 4 secondaries• Readable secondaries• Automatic or manual failover• Synchronous (protection)• Asychronous (performance)

Page 23: SharePoint & SQL 2012 Availability Groups

Protecting SharePointHA (Single farm)

• Synchronous commits• Non readable secondaries• Auto failover

DR (Standby farm)

• Asynchronous commits• Readable secondaries• Manual failover

Page 24: SharePoint & SQL 2012 Availability Groups

Other AG Benefits• Redirect read-only traffic• Redirect backup operations

Page 25: SharePoint & SQL 2012 Availability Groups

Comparing TechniquesSQL Server solution

Potential data loss (RPO)

Potential recovery time (RTO)

Automatic failover Readable

secondaries

AlwaysOn Availability Group (synchronous-commit)

Zero Seconds Yes 0 - 2

AlwaysOn Availability Group (asynchronous-commit)

Seconds Minutes No 0 - 4

AlwaysOn Failover Cluster Instance

Does not apply

An FCI itself does not provide data protection. The amount of data loss depends on the storage system implementation.

Seconds to minutes Yes Does not apply

Database mirroring - High-safety (synchronous mode + witness server)

Zero Seconds Yes Does not apply

Database mirroring - High-performance (asynchronous mode)

Seconds Minutes No Does not apply

Backup, copy, restore

Hours or zero if the tail of the log can be accessed after the failure.

Hours to days No Not during a restore

© Microsoft TechNet

Page 26: SharePoint & SQL 2012 Availability Groups

SharePoint Databases• Most databases support sync commits• Some databases support async commits• Content databases are supported for sync & async commits

Page 27: SharePoint & SQL 2012 Availability Groups

Requirements• Windows Server 2008 or later• Windows Server Failover Cluster (WSFC)• Sufficient number of WSFC nodes• Use a domain account for SQL Server• SQL Server 2012 Enterprise only• Same SQL configuration on each node• Full recovery model only

Page 28: SharePoint & SQL 2012 Availability Groups

Set Up• Wizards! For involuntary DBA’s like us • Don’t install SQL in cluster mode! Install SQL as standalone• Don’t use clustering tools to manage AG• Full recovery model needed

Page 29: SharePoint & SQL 2012 Availability Groups

Steps• Configure WSFC on all nodes• Install SQL 2012 on all nodes• Enable AG on all nodes with config mgr• Full backup of all databases involved• Create AG with wizard or T-SQL to

add servers to the AGrestore full backupsconfigure optionscreate a listener

Page 30: SharePoint & SQL 2012 Availability Groups

Install WSFC on all nodes

Page 31: SharePoint & SQL 2012 Availability Groups

Validate & Configure WSFC

Page 32: SharePoint & SQL 2012 Availability Groups

Install SQL Server on all nodes

Page 33: SharePoint & SQL 2012 Availability Groups

Activate AG

Page 34: SharePoint & SQL 2012 Availability Groups

DEMO

Page 35: SharePoint & SQL 2012 Availability Groups

SharePoint HA• Synchronous commit• Secondaries not readable• Single farm, single datacenter• Auto failover

Page 36: SharePoint & SQL 2012 Availability Groups

SharePoint DR• Asynchronous commit• Readable secondaries• Multi farm, multi datacenter• Manual failover

Page 37: SharePoint & SQL 2012 Availability Groups

SQL Server 2014

• 8 secondaries in stead of 4• More reliable secondaries• Azure VMs as replicas

Currently in CTP1

Page 38: SharePoint & SQL 2012 Availability Groups

Hot or Not?• All good stuff combined • Very flexible • Relatively easy to setup • Works with SharePoint • Synchronous for HA • Asynchronous / Read Only for DR • Not all databases supported • Requires SQL Server Enterprise

Page 39: SharePoint & SQL 2012 Availability Groups

Getting Started – Resources

Very good collection of informationby Brent Ozar:http://thvo.me/alwayson-res

“Supported high availability and disaster recovery options for SharePoint databases”on TechNet:http://thvo.me/alwayson-sp

Page 40: SharePoint & SQL 2012 Availability Groups

Q & A

@thomasvochten#spsnl13

Page 41: SharePoint & SQL 2012 Availability Groups

THANK YOU


Recommended