SQLintersection Session SQL37 SQL Server 2012 Availability Groups Aaron Bertrand

Slides:



Advertisements
Similar presentations
SQL Server AlwaysOn: Active Secondaries Luis Vargas Program Manager Microsoft Corporation DBI312.
Advertisements

Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)
SQL Server AlwaysOn.
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
Keith Burns Microsoft UK Mission Critical Database.
Virtual techdays INDIA │ September 2011 High Availability - A Story from Past to Future Balmukund Lakhani │ Technical Lead – SQL Support, Microsoft.
SQL Server 2012 Always On Premier Field Engineer Microsoft Corporation Lisa Gardner
SQL Server AlwaysOn: Active Secondaries Luis Vargas Program Manager Microsoft Corporation DBI312.
National Manager Database Services
SharePoint Business Continuity Management with SQL Server AlwaysOn
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
High-Availability Methods Lesson 25. Skills Matrix.
Architecting Availability Groups
SQL-Server 2012 Always On.
MODIFY THIS SLIDE FOR ACTUAL PRESENTER, DELETE THIS BAR AFTER MODIFICATION.
SQLintersection SQL37 SQL Server 2012 Availability Groups: High Availability for Your Most Important Data Aaron Bertrand,
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
SQLCAT: SQL Server 2012 AlwaysOn Lessons Learned from Early Customer Deployments Sanjay Mishra Program Manager Microsoft Corporation DBI360.
Unified solution Easy to configure, manage, and monitor Reuse existing investments SAN/DAS environments Allow using HA hardware resources Fast seamless.
SQLCAT: SQL Server HA and DR Design Patterns, Architectures, and Best Practices Using Microsoft SQL Server 2012 AlwaysOn Sanjay Mishra Program Manager.
Speaker Name 00/00/2013. Solution Requirements.
Alwayson Availability Groups
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
SQL Server 2012: AlwaysOn HA and DR Design Patterns, and Lessons Learned from Early Customer Deployments Sanjay Mishra SQLCAT.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
#sqlsatTorino #sqlsat400 May 23, 2015 SQL Server AlwaysOn Gianluca
Narasimha Reddy Gopu Jisha J. Agenda Introduction to AlwaysOn * AlwaysOn Availability Groups (AG) & Listener * AlwaysOn Failover * AlwaysOn Active Secondaries.
Luis Vargas Senior Program Manager Lead Microsoft.
SQL Server 2014 AlwaysOn Step-by-Step SQL Server 2014 AlwaysOn Step-by-Step A hands on look at implementing AlwaysOn in SQL Server 2014.
What HADR Option(s) Are Right For You?. Where’s The AlwaysOn?
SQL Server High Availability Introduction to SQL Server high availability solutions.
All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
Windows Server Failover Clustering (WSFC) with SQL Server.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
William Durkin A Gourmet Menu of SQL Server High Availability Options.
AlwaysOn In SQL Server 2012 Fadi Abdulwahab – SharePoint Administrator - 4/2013
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
Redmond Protocols Plugfest 2016 Kevin Farlee Senior Program Manager SQL Server AlwaysOn in SQL Server 2016.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
Level 400 SQL Server 2012 AlwaysOn Deep Dive Christian Bolton, Coeo Ltd.
SQLSaturday (Silicon Valley) – Mar
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
SQL Server AlwaysOn Availability Groups DrillDown
AlwaysON Availability groups
SQL Server 2012 AlwaysOn and SQLSentry
ALWAYSON AVAILABILITY GROUPS
Navigating the options for Data Redundancy
Disaster Recovery Where to Begin
Always On Multi-Site Patterns
Always On Availability Groups
Always on HA SQL Server Always ON feature is the new comprehensive high availability and disaster recovery solution which increases application availability.
Required 9s and data protection: introduction to sql server 2012 alwayson, new high availability solution Santosh Balasubramanian Senior Program Manager.
Always On : Multi-site patterns
AlwaysOn, an Early bird Overview
AlwaysOn Availability Groups 101
Disaster Recovery Where to Begin
Architecting Availability Groups
What’s new in SQL Server 2016 Availability Groups
Example of a page header
SYED SAJID WASIM SQL SERVER ALWAYS ON Step by Step.
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Distributed Availability Groups
04 | Always On High Availability
Using Distributed AGs for Your Migrations
Designing Database Solutions for SQL Server
Presentation transcript:

SQLintersection Session SQL37 SQL Server 2012 Availability Groups Aaron Bertrand

2 © SQLintersection. All rights reserved. Overview  Why were Availability Groups introduced?  What do they do?  How do they work?  What do they NOT do?  What enhancements will come in SQL Server 2014?

3 © SQLintersection. All rights reserved. Why were Availability Groups introduced?  Many ways of achieving high availability and/or disaster recovery:  Database Mirroring  Log Shipping  Replication  Failover Cluster Instances  All have shortcomings  Availability Groups are, essentially, Mirroring++  More importantly, overcome most of the shortcomings

4 © SQLintersection. All rights reserved. What do Availability Groups do?  Coordinate failover of multiple databases as a single unit  Provide for multiple replica partners (“secondaries”) – up to 4 (2 sync)  Reduce load on primary by allowing read-only workloads on secondaries  Reporting, log backups, full backups (well, COPY_ONLY)  Applications don’t have to know where their queries are routed  Teach you new buzzwords like RPO, RTO and RLO  Control over whether availability has (a)synchronous commit  Control over whether failover is automatic or manual  Control preference for where secondary replica backups occur  Many of same benefits as mirroring – log compression, auto page repair  Faster log synchronization than log shipping or replication  Flexible Failover Policies

5 © SQLintersection. All rights reserved. How do Availability Groups work?  Availability Groups use Windows Server Failover Clustering (WSFC)  Failover Clustered Instances (FCI) are possible, but not necessary  Same domain is required, but a WSFC can cross subnets  Shared storage not required  Quorum is used to determine whether enough nodes are up  Health Detection uses various metrics to determine state  Can fail over automatically or manually; automatic can be tuned  Synchronous / asynchronous commit trade availability for performance  Automatic failover requires synchronous commit  Listener is used to route connections, vs. transparent client redirect  Depending on availability and application intent  Can load balance reads across secondaries, and offload after failover

6 © SQLintersection. All rights reserved. Flexible Failover Policy Failure ConditionLevel On server down. This is the least restrictive level.1 On server unresponsive.2 On critical server error (1 and 2, plus internal errors). DEFAULT3 On moderate server error. (1 – 3, plus other errors like stack dumps). 4 On any qualified failure conditions. (1 – 4, plus other errors like worker thread exhaustion and unresolvable deadlocks). 5

7 © SQLintersection. All rights reserved. Asynchronous vs. Synchronous Commit  Synchronous commit waits for log to be hardened on secondary  This eliminates data loss potential, at the cost of performance  Usually combined with automatic failover with “close” replica(s)  Asynchronous commit does not wait for log to harden  This improves performance, but introduces risk of data loss  Only supports manual failover, and should be the only option for remote / DR replicas

8 © SQLintersection. All rights reserved. Quorum  Quorum means enough “votes” to keep the resource up  To ensure health and to prevent “split brain”  You want an odd number of quorum votes : up = “more than half”  If even number of nodes, use disk (shared) or file share (non shared)  Node majority (for odd number of nodes)  Node and file share majority (for even number in asymmetric storage)  Node and disk majority (for even number in shared storage)  Disk only (for shared storage)  You may want certain nodes to not have a vote (NodeWeight). E.g.:  Nodes on another subnet on a less reliable network  Priority in a multi-group or multi-instance scenario

9 © SQLintersection. All rights reserved. Quorum Example

10 © SQLintersection. All rights reserved. Common Questions  How do I migrate from database mirroring?  migrate-to-alwayson-alwayson-from-prior-deployments-combining- database-mirroring-and-log-shipping-part-1.aspx migrate-to-alwayson-alwayson-from-prior-deployments-combining- database-mirroring-and-log-shipping-part-1.aspx   What is involved in forcing a manual failover?   How do I monitor Availability Groups?  DMVs, SSMS (dashboard/Object Explorer Details), Extended Events  We’ll talk a bit about our software during this afternoon’s keynote 

11 © SQLintersection. All rights reserved. What do Availability Groups NOT do?  Handle cross-database transactions – consistency is not guaranteed  Commits are db-specific, so failover can cause out of sync  Distributed transactions cause an additional wrinkle after failover  Coordinate logins, jobs, linked servers, dbowner, trustworthy  Allow delayed apply, like log shipping  Go across domains – all WSFC nodes must be in the same domain  Wizard is inflexible – can’t specify WITH MOVE, for example  Run on Standard Edition, without a WSFC, or anything but full recovery  Save you money (active secondaries must be licensed)  Keep read-only secondaries available if primary is down  Solve every single HA/DR problem – e.g. suspect/damaged database

12 © SQLintersection. All rights reserved. SQL Server 2014 Enhancements  Now up to 8 secondary replicas (still 2 sync + automatic)  Readable secondaries stay available if network or quorum is down  Enhanced diagnostics  More specific error messages  XEvents in UTC time  More XEvents  Integration with Windows Azure (IaaS)  Can have sync + automatic failover replica inside Windows Azure  Can have async secondary replica for on-premise (requires VPN tunnel)

13 © SQLintersection. All rights reserved. Additional Resources  Twitter and #SQLHelp    Community Sites:        Brent Ozar Availability Groups Checklist alwayson-availability-groups-setup-checklist.pdf alwayson-availability-groups-setup-checklist.pdf  AG Troubleshooting and Monitoring Guide groups-troubleshooting-and-monitoring-guide-published.aspx groups-troubleshooting-and-monitoring-guide-published.aspx

14 © SQLintersection. All rights reserved. Final Comments  Availability Groups are one of the most compelling reasons to upgrade  We talked about:  Why were Availability Groups were introduced  What Availability Groups do  How Availability Groups work  What Availability Groups don’t do  What enhancements will come in SQL Server 2014  More info: come see the keynote this afternoon  Questions? 

Don’t forget to complete a session evaluation form and drop it off at the conference registration desk (or use the mobile app) Session: SQL37 Questions? Thank you!