sharepoint & sql 2012 availability groups
DESCRIPTION
Slides for my talk at SharePoint Saturday Netherlands 2013TRANSCRIPT
![Page 1: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/1.jpg)
SharePoint 2013 & SQL Server 2012 Availability Groups
Thomas Vochten
The Rough Guide
![Page 2: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/2.jpg)
![Page 3: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/3.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/4.jpg)
Agenda• Acronym Soup• Before SQL 2012• Availability Groups• Demonstration
![Page 5: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/5.jpg)
Acronym Soup
Setting the stage…
![Page 6: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/6.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/7.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/8.jpg)
RPO• Recovery Point Objective• How much data can you afford to lose?
Business decision!
![Page 9: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/9.jpg)
RTO• Recovery Time Objective• How fast do you want to be online again?
Business decision!
![Page 10: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/10.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/11.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/12.jpg)
Before SQL 2012
![Page 13: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/13.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/14.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/15.jpg)
SharePoint & Mirroring• PowerShell
$db = Get-SPDatabase [UglyGuidGoesHere]$db.AddFailoverServiceInstance(“servername”)$db.Update()
• User Interface
![Page 16: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/16.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/17.jpg)
Common Topologies
© Microsoft TechNet
![Page 18: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/18.jpg)
Other Techniques• SQL Replication• Backup/Restore• SAN Replication
![Page 19: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/19.jpg)
Availability Groups
![Page 20: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/20.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/21.jpg)
AG Concepts• Availability Group• Availability Replica• Availability Database• Availability Group Listener
![Page 22: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/22.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/23.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/24.jpg)
Other AG Benefits• Redirect read-only traffic• Redirect backup operations
![Page 25: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/25.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/26.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/27.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/28.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/29.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/30.jpg)
Install WSFC on all nodes
![Page 31: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/31.jpg)
Validate & Configure WSFC
![Page 32: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/32.jpg)
Install SQL Server on all nodes
![Page 33: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/33.jpg)
Activate AG
![Page 34: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/34.jpg)
DEMO
![Page 35: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/35.jpg)
SharePoint HA• Synchronous commit• Secondaries not readable• Single farm, single datacenter• Auto failover
![Page 36: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/36.jpg)
SharePoint DR• Asynchronous commit• Readable secondaries• Multi farm, multi datacenter• Manual failover
![Page 37: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/37.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/38.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/39.jpg)
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](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/40.jpg)
Q & A
@thomasvochten#spsnl13
![Page 41: SharePoint & SQL 2012 Availability Groups](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b6d5064a795983428b45c4/html5/thumbnails/41.jpg)
THANK YOU