Are AGs A Good Fit For Your Database? Doug Purnell

Similar documents
Ryan Adams Blog - Twitter Thanks to our Gold Sponsors

Index. Peter A. Carter 2016 P.A. Carter, SQL Server AlwaysOn Revealed, DOI /

EASYHA SQL SERVER V1.0

Microsoft SQL AlwaysOn and High Availability

High Availability- Disaster Recovery 101

SQL Server Availability Groups

Maximizing SharePoint Availability Whitepaper v1.1 4/2018

Microsoft SQL AlwaysOn and High Availability

High Availability- Disaster Recovery 101

Microsoft SQL Server

New England Data Camp v2.0 It is all about the data! Caregroup Healthcare System. Ayad Shammout Lead Technical DBA

Transactional Replication New Features for AlwaysOn AG in SQL Henry Weng Premier Field Engineer SQL Server & AI

Windows Clustering 101

Implementation of Microsoft SQL Server using AlwaysOn for High Availability and Disaster Recovery without Shared Storage

SQL Server 2012 virtually out, Microsoft talks features, licensing

Ryan Adams Blog - Twitter MIRRORING: START TO FINISH

SQL 2016 Always On High Availability

Avoiding the Cost of Confusion: SQL Server Failover Cluster Instances versus Basic Availability Group on Standard Edition

DOWNLOAD PDF SQL SERVER 2012 STEP BY STEP

Azure Webinar. Resilient Solutions March Sander van den Hoven Principal Technical Evangelist Microsoft

Microsoft Azure Windows Server Microsoft System Center

SQL Server DBA Course Content

Clusters Your Way. SQL Server in "The Cloud": High Availability and Disaster Recovery in Azure, AWS and Google

EXAM Administering Microsoft SQL Server 2012 Databases. Buy Full Product.

Architecting a Hybrid Database Strategy with Microsoft SQL Server and the VMware Cloud Provider Program

AlwaysOn Availability Groups: Backups, Restores, and CHECKDB

SQL Server Virtualization 201

Patient C SQL Critical Care

SQL AlwaysOn - Skype for Business

SQL Server technical e-book series. Drive business continuity with SQL Server

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

A Closer Look at Distributed Availability Groups. Allan Hirt, Managing Partner, SQLHA LLC Moderated By: George Carlisle

HIGH-AVAILABILITY & D/R OPTIONS FOR MICROSOFT SQL SERVER

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Performance Monitoring Always On Availability Groups. Anthony E. Nocentino

MS SQL Server 2012 DBA Course Contents

Microsoft SQL Server" 2008 ADMINISTRATION. for ORACLE9 DBAs

SQL Saturday Jacksonville Aug 12, 2017

StarWind Virtual SAN SQL Server HADR using Availability Groups and Failover Cluster Instance

Synergetics-Standard-SQL Server 2012-DBA-7 day Contents

SQL Server 2014 Upgrade

Microsoft SQL Server HA and DR with DVX

Course 6231A: Maintaining a Microsoft SQL Server 2008 Database

Number: Passing Score: 800 Time Limit: 120 min File Version:

SQL Server 2014 Training. Prepared By: Qasim Nadeem

Course 6231A: Maintaining a Microsoft SQL Server 2008 Database

MOVING TOWARDS ZERO DOWNTIME FOR WINTEL Caddy Tan 21 September Leaders Have Vision visionsolutions.com 1

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Defining a Service Level Agreement (SLA)

Performance Monitoring AlwaysOn Availability Groups. Anthony E. Nocentino

Introduction Chapter 1. General Information Chapter 2. Servers Used... 9

Swiss IT Pro SQL Server 2005 High Availability Options Agenda: - Availability Options/Comparison - High Availability Demo 08 August :45-20:00

How to Lift-and-Shift a Line of Business Application onto Google Cloud Platform

Welcome to the. Migrating SQL Server Databases to Azure

6 Months Training Module in MS SQL SERVER 2012

StarWind Virtual SAN Windows Geo-Clustering: SQL Server

Disaster Recovery-to-the- Cloud Best Practices

HP StoreVirtual Storage Multi-Site Configuration Guide

Maintaining a Microsoft SQL Server 2008 Database (Course 6231A)

Floating on a Hybrid Cloud: SQL Server 2014 & Microsoft Azure Timothy P. McAliley Microsoft Premier Field Engineer SQL Server May 8, 2014

Manually Run The Synchronization Replication Sql Server 2005 Delete

AlwaysOn Availability Groups 2016 What is new?

microsoft. Number: Passing Score: 800 Time Limit: 120 min.

Introducing Microsoft SQL Server Preview Edition Higher availability. Stacia Varga, Denny Cherry, Joseph D Antoni

Design and implement cloud data platform solutions.

The safer, easier way to help you pass any IT exams. Exam : Administering Microsoft SQL Server 2012 Databases.

SQL Server AlwaysOn setup on ObserveIT environment

SQL Server DBA Course Details

SQL Server HA and DR: A Simple Strategy for Realizing Dramatic Cost Savings

Managed IT Solutions. Managed IT Solutions

Patient A SQL Critical Care Part 1: Health Triage Findings

Microsoft SQL Server Fix Pack 15. Reference IBM

Installing PI AF with SQL Server 2012 AlwaysOn Availability Group Feature. Version 1.0

DocAve 6 High Availability

Cohesity DataPlatform Protecting Individual MS SQL Databases Solution Guide

High Availability for PROS Pricing Solution Suite on SQL Server

SQL Server DBA Online Training

SPECIAL EXCERPT II Complete book available Spring Introducing Microsoft. SQL Server 2012 PREVIEW CONTENT. Ross Mistry and Stacia Misner

The Right Choice for DR: Data Guard, Stretch Clusters, or Remote Mirroring. Ashish Ray Group Product Manager Oracle Corporation

WHAT S NEW IN SQL SERVER 2016 REPORTING SERVICES?

Maintaining a Microsoft SQL Server 2005 Database Course 2780: Three days; Instructor-Led

Dell EMC Avamar for SQL Server

Dell EMC Avamar for SQL Server

Microsoft. Designing Database Solutions for Microsoft SQL Server 2012

DocAve 6 High Availability

Designing, Optimizing, and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Martin Cairney. Hybrid data platform making the most of Azure plus your onprem

SnapManager 6.0 for Microsoft SQL Server Installation and Administration Guide

Virtual protection gets real

Building Clusters to Protect SQL Server in Cloud Configurations

Vendor: Microsoft. Exam Code: Exam Name: Administering Microsoft SQL Server 2012 Databases. Version: Demo

SQL Server Myths and Misconceptions

Accelerate SQL Server 2012 AlwaysOn Availability Groups Deployment on NetApp Storage


Availability and Performance for Tier1 applications

Allan Hirt Cluster MVP E mail: Website and Blog:

Server Fault Protection with NetApp Data ONTAP Edge-T

MIMIX. Version 7.0 MIMIX Global Operations 5250

HP StoreVirtual Storage Multi-Site Configuration Guide

GR Reference Models. GR Reference Models. Without Session Replication

Transcription:

Are AGs A Good Fit For Your Database? Doug Purnell

About Me DBA for Elon University Co-leader for WinstonSalem BI User Group All things Nikon Photography Bring on the BBQ!

Goals Understand HA & DR Types of HR & DR Solutions WSFC/AG Checklists Demo Resources

CYA Management determines the following: Recovery Time Objective (RTO) How long can the database be down? Recovery Point Objective (RPO) How much data can we lose? Recovery Level Objective (RLO) Granularity to recover data (Instance, Database, or Tables) The answer to these questions helps determine your HA/DR requirements. Read-only file groups might be an option for RLO for historical data.

HA < > DR

High Availability (HA) Minimize the impact of downtime (keep the data available!)

Disaster Recovery (DR) Re-establish availability after an outage DR can be physical (power or storem), HW (SAN or RAID controller), or logical (OS blue screen)

Questions to Ask What is the business issue you re trying to solve? Do you have experience supporting the HA/DR solution? Do you have a test environment to test your solution? You are the architect! Work with your system engineers and SAN administrators to understand your HW capabilities. SAN Replication are VM snapshots other options.

SQL Server HR & DR Options Backup and Recovery Replication Log Shipping Mirroring AlwaysOn Failover Cluster Instance (FCI) AlwaysOn Availability Groups (AG) Which ones of these are HA and/or DR? Backup and Recovery is old school. Jobs can be setup to restore database backups and transaction log on another server or offsite. Replication can be setup to copy data from one server to another or offsite. Snapshot, transactional, and peer-to-peer can be used to duplicate data. No automatic failover. Can have as many subscribers as you like. May increase support to keep the publisher, distributor, and subscribers in check. Databases on the subscriber are usable. Log Shipping helps automate Backup and Recovery. Databases are usable between restore jobs but restore jobs need elusive rights and the database is not usable during that time. A monitor server can be setup to keep tabs on everything. Secondary copies can be brought online if primary database fails. Log shipping supports multiple secondaries. Available under standard edition. The secondary databases can be left in recovery or standby mode. Backup jobs can disconnect users or delayed until the users are disconnected. No automatic failover. Mirroring At the database level and can only have one mirror instance. Databases need to be in full recovery model and the principal and mirror server need to be running the same version of SQL Server. Database on mirror server is in a Recovery state and cannot be accessed. A database snapshot can be used but requires Enterprise Edition. Mirroring supports automatic failover but requires a Witness server to keep track of the principal server. Mirroring operations can be synchronous (high-safety) or asynchronous (high-performance). Application connection string can be set to support Failover_Partner=<server name>. FCI (Clustering)

Log Shipping

Database Mirroring

Database Mirroring

Always on FCI

AG Overview SQL Server Enterprise Edition Licensing requirements if you re using the secondary replica. Active Directory Domain Windows Server Failover Cluster (WSFC) WSFC can span subnets but not different domains. Supports multiple readable secondaries (great for off loading reports). Applications connect to each AG via virtual listener name.

AG Overview Synchronous Synchronization (No data loss) Allows for automatic failures. Transactions are applied to all replicas before control is passed back to application. Asynchronous Synchronization (Possible data loss) Transactions are committed on the primary replica and then control is passed back to application. Secondary replicas receive changes at a later time. Up to 10 databases per AG and up to 10 AGs SQL Server 2012 supports primary plus 4 secondary replicas, 3 of them synchronous (Primary plus two) SQL Server 2014 supports primary plus 8 secondary replicas, 3 of them synchronous (Primary plus two) https://msdn.microsoft.com/en-us/library/ff878487.aspx

AG Overview One or more databases can reside within an availability group. The listener is the virtual name for the Availability Group that your application connects to. The listener name will follow the primary replica as a failover event occurs. Automatic Page Repair is supported between the primary and secondary replica (two way) Session-timeout period determines how long connection with another availability replica can remain inactive before the connection is closed. https://msdn.microsoft.com/en-us/library/hh213417.aspx https://msdn.microsoft.com/en-us/library/bb677167.aspx

https://msdn.microsoft.com/en-us/library/ff877884.aspx AG Overview

Pre WSFC/AG Checklist All WSFC nodes need to be a part of the same domain. Validate Configuration and pay attention to errors and warnings. AD account needs rights to create computer objects under OU. You can grant the necessary rights or log in with sufficient rights. AlwaysOn Availability Groups needs to be enabled for each SQL Server instance (SQL Server Configuration Manager) after the WSFC is established.

Pre WSFC/AG Checklist If you are using TDE, you have to implement AGs with T-SQL. Databases need to be in FULL recovery model with a recent backup performed. You will need IP and Cluster Name for WSFC. You will need a name for the AG. You will need IP and Listener name for each AG. AG Wizard does not support TDE, https://msdn.microsoft.com/en-us/library/hh510178.aspx Come up with naming standards for your WSFC/AG

Post AG Checklist Backups can be done on primary or secondary. No DIFF backups on the secondary FULL backups on secondary require WITH COPY_ONLY sys.fn_hadr_is_preferred_backup_replica function DBCC CheckDB can be done on primary or secondary. Connection Strings Primary -> Server=Listener;Database=DB_1 Secondary -> Server=Listener;Database=DB_1;ApplicationIntent=ReadOnly Requires manual routing (T-SQL or PoSh) DBCC CHECKDB is recommended on all secondaries that could become primary or where backups are performed because the storage is different across all the nodes.

Post AG Checklist Ola Hallengren s scripts are AG aware. Logins & Jobs are separate for each node. Index maintenance has to be done on primary replica. Jonathan Kehayias as written a SSMS 2012 add-on to help with logins and jobs.

https://msdn.microsoft.com/en-us/library/hh710054.aspx READ_ONLY Routing

Quorum Best practice is to have odd number of votes. Each node has a single vote by default. Any host that could host a primary replica should have a quorum vote. Secondary disaster recovery sites may not need a quorum vote. You can use File Share Witness to break a tie. More than one-half of the voting nodes/witnesses need to report back for a cluster to be healthy. Split-brain is when one subset of voting nodes is able to establish a quorum on its own (this is rare). Windows Server 2012 introduced dynamic quorum. Votes are removed if nodes leave the cluster membership. https://technet.microsoft.com/en-us/library/jj612870.aspx

Use SQLskills app to create transactions and do failover events. Show dashboard Show AG Properties (Setup and Backup preferences) AG Demo

AG Transaction Test The goal of this test was to understand how AG would handle open transactions during a failover event.net Entity Framework application with retry logic SP was built to open transaction, insert row, wait one minute, insert a second row, and commit transaction

AG Transaction Results 1..NET app started at 9:23:45 (open trans) 2. AG Failover at 9:24:11 3. Rollback trans from 9:23:45 4. Database down from 9:24:11 through 9:24:20 5..NET retry at 9:24:11 (unable to open listener) 6..NET retry at 9:24:15 (unable to open listener) 7..NET retry at 9:24:22 (listener available) 8..NET called SP 9. Trans committed at 9:25:22 (2 records inserted)

AG Failover Test The goal of this test was to understand how a.net Entity Framework application would handle an AG failover in between database requests Application was written to query SQL Server before and after the AG Failover Entity Framework does not keep open connections to the database so failover had no effect on app behavior

Some of the HA/DR options can be joined together. Combine FCI & AG

Here is a possible solution with Azure. Azure Hybrid IT

Resources Allan Hirt s Mission Critical SQL Server Book SQL Server Customer Advisory Team Blog SQL Server Blog SQL Release Services Blog SQL Server Builds Blog SQL Server AlwaysOn Support Team

Brent Ozar AG Quiz Resources Kendra Little s Hard Truth About Patching SQL Server AGs HA DR Virtual User Group AG Ports Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups VMware GARP Issue

Questions? Doug Purnell @SQLNikon sqlnikon@gmail.com sqlnikon.wordpress.com