SQL Server 2016 AlwaysOn Availability Groups New Features

24

Click here to load reader

Transcript of SQL Server 2016 AlwaysOn Availability Groups New Features

SQL Server 2016 alwayson availability groupsNew features and enhancements

1

Tuning blog: http://www.sqlperformance.com/

E-mail [email protected] for free copies of our $10 e-books:

Demo CodeDemo code for this slide deck can be found at;

http://1drv.ms/1PC8707

Your presenterJohn Q MartinSales Engineer for SQL SentryWorked with SQL Server for ~10 yearsConsultant, SQL DBA, Dev & BI DeveloperFormer Microsoft Premier Field Engineer

Contact InformationEmail: [email protected]: http://blogs.sqlsentry.com/author/johnmartin Twitter: @SQLServerMonkeyLinkedIn: https://uk.linkedin.com/in/johnqmartin

AgendaIntroductions

EnhancementsEnhanced Availability ConfigurationLoad Balanced Active Secondaries

New FeaturesSupport for Group Managed Service AccountsDistributed Transaction SupportDatabase Health events cause failover

Wrap Up

10/19/2015 5:23 PM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

5

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimarySynchronousSynchronous

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimarySynchronousSynchronous

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimarySynchronous

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimarySynchronous

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimary

SQL Server 2014 & Prior, this will result in system offline.

Enhanced Availability

SQL Server 2016 Increases the number of Automatic Failover PartnersNow possible to have two failover partners in addition to the primary.True High Availability now possible.

SqlDb01

SqlDb02

SqlDb03

ListenerPrimary

SQL Server 2016 the system will be online as the listener fails over.

demoImprovements in Availability with additional Failover Partners

Load Balanced Read-only Replica

SQL Server 2014 routing lists were the order of the secondaries that you wanted to access in a failure precedent order.

alter availability group [sqlLabAg01]modify replica on 'sqlLabDb01'with(primary_role(read_only_routing_list = ('sqlLabDb02','sqlLabDb03','sqlLabDb01')));go

Load Balanced Read-only Replica

SQL Server 2016 allows for groups of replicas to be specified to accessed in a round robin order.Note the additional parentheses in the routing list.

alter availability group [sqlLabAg01]modify replica on 'sqlLabDb01'with(primary_role(read_only_routing_list =(('sqlLabDb02','sqlLabDb03'),'sqlLabDb01')));go

14

Load Balanced Read-only Replica

Allows for scaling out read-only workloads nativelyNo need to code bespoke access to secondary replicasWorkload will adjust in the event of a failover

Need to be aware of redo latencyImportant to monitor the redo queue as the load balanced replicas could be at different points in redo process.

Try to avoid mixing Synchronous and Asynchronous replicas in the same load balance group for data consistency.

15

demoDistributing load between Secondary Replicas.

Group Managed Service Accounts

Managed Service Accounts (MSA) introduced in Windows Server 2008Required domain functional level of 2008 or above.Remove the need for manual password rotation.Domain level object that can be granted access line any other user account.

Limited to a one to one mapping between MSA and Server

SQL Server supported MSA from SQL Server 2012 and aboveGreat for standalone servers.One to One mapping reduced meant no Kerberos for AG configurations.

https://technet.microsoft.com/en-us/library/hh831782.aspx17

Group Managed Service Accounts

Group Managed Service Accounts (gMSA) introduced with Windows Server 2012Require Domain Functional level of 2012 or aboveSame advantages of MSA

Can be managed by multiple machinesMachine accounts are added to domain security groups.

SQL Server 2016 supports the use of gMSANow allows same account on all Availability Group replicas, and Kerberos authentication against listener.

DemoUsing Group Managed Service Accounts with AlwaysOn Availability Groups.

Distributed Transactions

AlwaysOn Availability Groups in SQL Server 2012 & 2014 DO NOT SUPPORT Distributed Transactions.Cross Database, intra-instance queriesCross Database, inter-instance queries

Biggest blocker for the adoption of Availability Group technology.It functions but will is not supported.

SQL Server 2016 fixes this problem.

Distributed Transactions

Requires Windows Server 2016 in order to support the use of Distributed Transactions.Due to a change in the MSDTC that is not presently in Windows Server 2012/R2.

In-Doubt Transactions can occur in the event that there is a discrepancy between SQL Server Database Transaction Log and MSDTC Log.Can result in SQL Server shutdown or suspect databases.

In the event of a failover the recovering database will contact the old primary server for DTC.This will allow the system to complete crash recovery.

Database Health Monitoring

SQL Server 2016 will complete an Availability Group Failover if database health is degraded. SQL Server 2012 & 2014 required an instance level event in order for a failover to take place.

Availability Group is still the unit of failover in the event of an issue.Detection of issues in one database will cause all databases in the Availability Group to Failover.

Questions

23

THANK YOU!

Slides will be available at http://blogs.sqlsentry.com/author/johnmartin

E-mail [email protected] for free copies of our e-books:Just tell them where you met me

My contact info for other questions:Email: [email protected]: @SQLServerMonkey

24