Roger Technology Solution Professional DataPlatform Microsoft Corporation SQL Server 2012AlwaysOn Availability Groups.

Slides:



Advertisements
Similar presentations
Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)
Advertisements

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.
1© Copyright 2011 EMC Corporation. All rights reserved. EMC RECOVERPOINT/ CLUSTER ENABLER FOR MICROSOFT FAILOVER CLUSTER.
SQL Server 2012 Always On Premier Field Engineer Microsoft Corporation Lisa Gardner
SQL Server AlwaysOn: Active Secondaries Luis Vargas Program Manager Microsoft Corporation DBI312.
Roger Technology Solution Professional DataPlatform Microsoft Corporation SQL Server 2012 on Windows Server Core.
BARBARIN DAVID SQL Server Senior Consultant Pragmantic SA SQL Server Denali : New administration features.
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
Stephan Hurni Consultant Trivadis AG, SQL Server notes from the field.
SQL-Server 2012 Always On.
Get More out of SQL Server 2012 in the Microsoft Private Cloud environment Guy BowermanMadhan Arumugam DBI208.
Using the WDK for Windows Logo and Signature Testing Craig Rowland Program Manager Windows Driver Kits Microsoft Corporation.
IT Pro Day SQL Server 2012 AllwaysOn Stephan Hurni Microsoft V-TSP Principal Consultant, Trivadis AG
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,
SQLintersection Session SQL37 SQL Server 2012 Availability Groups Aaron Bertrand
DBI Meets mission critical high availability SLA Integrated Efficient Flexible.
Unified solution Easy to configure, manage, and monitor Reuse existing investments SAN/DAS environments Allow using HA hardware resources Fast seamless.
Session objectives Discuss whether or not virtualization makes sense for Exchange 2013 Describe supportability of virtualization features Explain sizing.
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.
Exchange Deployment Planning Services Exchange 2010 Complementary Products.
Alwayson Availability Groups
René Balzano & Roger Breu Technology Solution Professionals Data Platform Microsoft Switzerland SQL Server vNext.
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 |
Data Disaster Recovery Planning Greg Fibiger 1/7/2016.
Praveen Srivatsa Director| AstrhaSoft Consulting blogs.asthrasoft.com/praveens |
Narasimha Reddy Gopu Jisha J. Agenda Introduction to AlwaysOn * AlwaysOn Availability Groups (AG) & Listener * AlwaysOn Failover * AlwaysOn Active Secondaries.
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.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
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.
High Availability & Disaster Recovery with SQL Server AlwaysOn Availability Groups Turgay Sahtiyan Microsoft – Senior SQL Server PFE
SQLSaturday (Silicon Valley) – Mar
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
SQL Server AlwaysOn Availability Groups DrillDown
AlwaysON Availability groups
Disaster Recovery Where to Begin
AlwaysOn Readable Secondary
Microsoft SQL Server 2017 Maximum Availability & Read Scale-Out
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.
Design and Implement Cloud Data Platform Solutions
Contained DB? Did it do something wrong?
Configuring the network environment
Required 9s and data protection: introduction to sql server 2012 alwayson, new high availability solution Santosh Balasubramanian Senior Program Manager.
AlwaysOn, an Early bird Overview
AlwaysOn Availability Groups 101
Your Data Any Place, Any Time
Denali Always On for Mission Critical Systems
What’s new in SQL Server 2016 Availability Groups
SYED SAJID WASIM SQL SERVER ALWAYS ON Step by Step.
Microsoft Virtual Academy
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Keeping the Lights on with SQL Server 2012 AlwaysOn
Distributed Availability Groups
Building global and highly-available services using Windows Azure
Windows Azure Hybrid Architectures and Patterns
04 | Always On High Availability
Designing Database Solutions for SQL Server
Presentation transcript:

Roger Technology Solution Professional DataPlatform Microsoft Corporation SQL Server 2012AlwaysOn Availability Groups

What is an Availability Group? Availability Group Setup Step by Step Active Secondaries Tuning and Monitoring Q&A Agenda

SQL Server 2012 AlwaysOn Availability Groups What is an Availability Group?

HA/DR Features before Failover Clustering Virtual Networkname (transparent) Multidatabase failoverShared storage neededNo active secondaries available DR only with Storage Replication or additional Logshipping/ Database Mirroring Database Mirroring Fast FailoverNo Shared Storage needed Application has to be “mirroring-aware” (SNAC or connectstring modification) No virtual network name to connect Only 1 active secondary with database snapshots on the mirror Log Shipping Multiple SecondariesNo Shared Storage neededNeeds good monitoringNo automatic failover Secondaries offline while applying transactionlog backups

AlwaysOn Availability Groups is a new feature that enhances and combines failover cluster, database mirroring and log shipping capabilities AlwaysOn Availability Groups Multi-database failover Multiple secondaries Total of 4 secondaries 2 synchronous secondaries 1 automatic failover pair Synchronous and asynchronous data movement Built in compression and encryption Flexible failover policy Automatic Page Repair Application failover using virtual name Configuration Wizard Dashboard System Center Integration Rich diagnostic infrastructure File-stream replication Replication publisher failover Flexible Active Secondary Readable Secondary Backup from Secondary Automation using power-shell

Availability Group Scenarios Synchronous Data Movement Asynchcronous Data Movement AGAG AGAG AGAG AGAG AGAG Direct Attached Storage local, regional and geo secondaries Example Primary in Calgary Failover Partner in Vancouver Sync DR in Toronto Async Secondary in Montreal (Reporting) Async Secondary in London (Geo DR)

Availability Group Scenarios Synchronous Data Movement Asynchcronous Data Movement Shared Storage local, regional and geo secondaries mixed with Direct Attached Storage Example Primary Failover Cluster in Calgary Sync Secondary Failover Cluster in Vancouver AGAG AGAG Async DR Standalone Server in Toronto AGAG

«Container» 1 or more Databases Listener (aka virtual networkname) 1 or more IP Addresses (DHCP or fix, aka virtual IP) Replica Definition Primary/Secondaries Automatic Failover Partner Sync/Async Secondaries The Availability Group DB AGAG AG_VNN AG_IP

Availability Group Architecture Availability Group uses Windows Server Failover Cluster (WSFC) for Inter-node health detection Failover coordination Primary health detection Distributed data store for Availability Group settings and state Distributed change notifications Windows Server Failover Cluster Database Active Log Synchronization Database Active Log Synchronization SQL Server synchronizes databases Based on Transaction Log Via TCP Endpoint Synchronous or asynchronous Compressed Logstream Encrypted Logstrem DB AGAG AG_VNN AG_IP

SQL Server 2012 AlwaysOn Availability Groups Availability Group Setup Step by Step

Windows Server 2008/2008 R2 Failover Cluster Feature installed Windows Server Failover Cluster created Needs Cluster Networkname and IP Address No Shared Storage needed Quorum can be configured with Fileshare Witness OS Requirements

SQL Server 2012 Installed as Standalone (or SQL Server Failover Cluster*) Instance on every Windows Server Failover Cluster Node Can be named or default instance Instance names don’t have to be the same All Nodes have to be part of the same Windows Server Failover Cluster All Instances must use the same collation Domain Service Account AlwaysOn Availability Groups feature enabled via SQL Server Service Configuration Manager SQL Server Requirements

Each availability group name must be unique on the WSFC cluster For a given availability group, the availability replicas must be hosted by server instances running on different nodes of the same WSFC cluster # of availability groups on a given server instance is unlimited Recommended maximum is ten availability groups per instance # of database in a given availability group is unlimited Recommended maximum is 100 databases per availability group Availability Group Requirements

Must be a user database System databases cannot belong to an availability group Must be a read-write database Read-only databases cannot be added to an availability group Must be a multi-user database Not use AUTO_CLOSE Use the full recovery model Possess a full database backup Reside on the SQL Server instance where you are creating the availability group and be accessible to the server instance Not belong to another availability group Not be configured for database mirroring Database Requirements

Setup Windows Server Failover Cluster Nodes Configure WSFC Setup SQL Server Instances Same collation Recommended to configure same DB/Tlog File pathes Enable AlwaysOn Availability Groups via SQL Server Service Configuration Manager Instance restart needed Start deploying Availability Groups Checklist

Application reconnects using a virtual name (listener) after a failover to a secondary PrimarySecondary -server Techdays1 Application retry during failover Connect to new primary once failover is complete and the listener is online Primary Secondary CALGARY VANCOUVER TORONTO Demo Scenario – Application Failover DB1 DB2 DB1 DB2 DB1 DB2 Techdays AG1 Techdays1 (VNN) AG_IP WSFC DENALIWINCLU1

Via SQL Server Management Studio Expand the Management node, the AlwaysOn High Availability node, and the Availability Groups node. Right-click the availability group to be failed over, and select the Failover command. Via T-SQL ALTER AVAILABILITY GROUP TechdaysAG1 FORCE_FAILOVER_ALLOW_DATA_LOSS; Via PowerShell Switch-SqlAvailabilityGroup -Path SQLSERVER:\SQL\secondarymachine\secondaryinstance\Availab ilityGroups\TechdaysAG1 -AllowDataLoss Via Failover Cluster Manager Initiate a failover

WSFC Service SQL Server Instance AG Res DLL WSFC Service SQL Server Instance AG Res DLL WSFC Service SQL Server Instance AG Res DLL Availability Group 1 Availability Group 2 User tells SQL to failover Availability Group 2 to Node1 SQL confirms and tells WSFC WSFC tells AG Res DLL to bring AG2 offline WSFC tells AG Res DLL to bring AG2 online Notification of new primary Secondaries request primary connection Clients disconnected from AG2 Client connections transparently redirected to primary via IP and network name resources Availability Group Architecture Drilldown

Introducing Contained Databases or CDB’s Unit of application programmability in Denali A DB which establishes a boundary between application and server CDBs sever the user–login relationship Windows users no longer need matching logins Users with passwords replace SQL logins What about Server Objects? CDB can be part of an availability group and can failover across replicas Authentication information moves with the CDB Limitation Other objects, like jobs are not contained and have to be managed

SQL Server 2012 AlwaysOn Availability Groups Active Secondaries

AlwaysOn Active Secondary IT efficiency and cost- effectiveness is critical for businesses Idle hardware is not an option anymore AlwaysOn Active Secondary enables efficient utilization of high availability hardware resources thereby improving overall IT efficiency Active Secondary can be utilized for Balancing read-only workloads Offloading Backup Operations

Read-Only client connection behavior determined by Availability Replica Option+ ApplicationIntent Property ApplicationIntent is a connection property Replica option determines whether a replica is enabled for read access when in a secondary role Read-Only Routing enables redirection of client connection to new secondary on role change Enable seamless redirection of application connection across replicas without manual intervention Configuration with Read-Only Routing Lists Read-Only Client Connectivity

Readable secondary allows offloading read queries to secondary Automatic redirect with Routing Lists or manual connect to Secondary PrimarySecondary -server Techdays1 Application retry during failover Connect to new primary/new secondary once failover is complete and the listener is online Primary Secondary CALGARY VANCOUVER TORONTO Demo Scenario – Active Secondary DB1 DB2 DB1 DB2 DB1 DB2 Techdays AG1 Techdays1 (VNN) AG_IP Reports -server Techdays1; ApplicationIntent=ReadOnly WSFC DENALIWINCLU1

DB1 Data Log Cache Close to real-time reads Log is first hardened and then applied Redo thread is asynchronous and runs in the background Latency (typically seconds) can be larger for log intensive operations like bulk import or index create/rebuild Sync Replica minimizes latency due to network issues DB1 DB1 Log DB1 PrimarySecondary Log Capture Log Recieve DB1 Data Network Redo Thread Redo Pages DB1 Log Page Updated Log Harden Log Flush Commit Acknowledge Commit Log Pool

Backups can be done on any replica of a database (Full WITH COPY_ONLY or Tlog) Backups on primary replica still works Log backups done on all replicas form a single log chain Database Recovery Advisor makes restores simple Enabling Backup On Secondary R/W workload Primary Backups Secondary Backups Secondary Backups

SQL Server 2012 AlwaysOn Availability Groups Tuning and Monitoring

All the availability replicas should run on comparable systems that can handle identical workloads For best performance, use a dedicated network adapter for AlwaysOn Availability Groups (LogStream) Every computer on which a server instance hosts an availability replica must possess sufficient disk space for all the databases in the availability group Keep in mind that as primary databases grow, their corresponding secondary databases grow the same amount For the New Availability Group wizard to automatically start initial data synchronization, every secondary database must use the same file path as its corresponding primary database If you add a file to a primary database, secondary replica(s) will be able to add the new file on the corresponding secondary database(s) Fine Tuning/Tipps

Make sure, WSFC network name has „add workstation to domain“ rights otherwise it will only add up to 10 VNNs Failover Cluster Failure Threshold should be adjusted for Test-runs In the Failover Cluster Management snap-in navigation pane, expand one of the managed clusters that has a highly available application or service configured. Expand the Services and Applications category. Select and then right-click one of the groups, and then click Properties. Click the Failover tab, and then view the Maximum failures in the specified period setting TraceFlag 9532 needed for all SQL Server 2012 CTP3 instances to allow more than one replica Configuration via SQL Server Configuration Manager on every node Add T9532 on the startup tab Won’t be necessary with RTM Bits Fine Tuning/Tipps

Please consult following KB article for configuration and download Hotfix us/library/hh270279(v=SQL.110).aspx Cluster.exe DENALIWINCLU1 node TORONTO /prop NodeWeight=0 Remove the DR side vote so that a network interruption doesn’t affect the servers running on the main site for HA Node weight Quorum Settings

WSFC Service SQL Server Failover Cluster Instance AG Res DLL IsAlive /LooksAlive WSFC asks Res DLL if SQL AG alive exec sp_server_diagnostics Diagnostics generated for Health State Components System Resource Query Processing IO Subsystem Events Diagnostics generated for Health State Components System Resource Query Processing IO Subsystem Events Diagnostics User sets new Cluster properties HealthCheckTimeout and FailureConditionLevel IsAlive/ LooksAlive result based on diagnostics and FailureConditionLevel FailureConditionLevel (0 to 5) 5 – Failover or restart on any qualified failure 4 – Failover or restart on moderate SQL Server errors 3 – Failover or restart on critical SQL Server errors 2 – Failover or restart on SQL Server unresponsive 1 – Failover or restart on SQL Server down 0 – No Automatic Failover or restart Flexible Failover Policy

Availability Group Dashboard in Management Studio Monitoring will be fully integrated into the SQL Server 2012 Management Pack for SCOM Including Database Mirroring Monitoring and Replication Monitoring for SQL Server 2008 R2 Lots of new DMVs: us/library/ff878305(v=SQL.110).aspx Availability Group Monitoring

Virtualization provides best consolidation isolation Virtualization without AlwaysOn: Simplest management story for limited HA/DR: When to use AlwaysOn for the guest: Need better HA/DR protection than standalone VM Virtualization with AlwaysOn PlannedUnplanned HostLive MigrationVM failover (OS restart, Quick Migration) GuestDowntime during patchNo protection from virtualization

SQL Server 2012 AlwaysOn Availability Groups Conclusion

SQL Server AlwaysOn Availability Groups is a comprehensive high availability and disaster recovery solution Integrated Flexible Cost-Efficient «Classical» Failover Clustering, Database Mirroring and Log Shipping are not dead A combination of all solutions can bring you to meet your SLAs Conclusion

SQL Server 2012 AlwaysOn Availability Groups Additional Resources

SQL Server 2012 Developer Training Kit SQL Server 2012 CTP3 Product Guide swissSQL Blog AlwaysOn Resource Center AlwaysOn Availability Group Prerequisites AlwaysOn Availability Groups together with SQL Server Failover Cluster Instance Links

Please help us make TechDays even better by Evaluating this Session. Thank you! Give us your feedback!

© 2011 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.