SQL Server 2012 AlwaysOn
SQL Server 2012 AlwaysOn
Joo Loureiro
Microsoft
SQL Server Senior Support Escalation Engineer (3rd tier support level) Bridge between frontline support and SQL product group SQL Server Denali TAP Escalation Engineer (part of SQL Server Beta program) Blog: http://blogs.msdn.com/joaol ([email protected]) Engaged on Service Packs, hot fixes and new product releases.
but
Solutions fragmented Lack important flexibility points
Integrated
Flexible
Efficient
Flexible
Multi-database failover Multiple secondaries
Total of 4 secondaries 2 synchronous secondaries 1 automatic failover pair
Integrated
Application failover using virtual name Configuration Wizard Dashboard System Center Integration Rich diagnostic infrastructure File-stream replication Replication publisher failover
Efficient
Active Secondary
Readable
Secondary Backup from Secondary
Synchronous and asynchronous data movement Built in compression and encryption Automatic and manual failover Flexible failover policy Automatic Page Repair
A A A A
A A
demo
Deploy using AlwaysOn Availability Groups
Application Failover
Availability Groups Listener allow applications to failover seamlessly to any secondary
ServerB
HR DB
ServerC
AG_HR
HR_VNN
Primary
Primary Secondary
Secondary Secondary
Application retry during failover Connect to new primary once -server HR_Listener;failover is complete catalog HRDB and the listener is online
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 has to be managed
Inter-node health detection, Failover coordination, Primary health detection, Distributed data store for settings and state, Distributed change notifications
Primary Secondary
Secondary Primary
SQLservr.exe
InstanceB
DB1
DB2
DB1
DB2
Reports
Reports
Readable secondary allow offloading read queries to secondary Close to real-time data, latency of log synchronization impact data freshness
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
Solution
Internally map read workload to non blocking isolation levels (no application changes required)
Read Uncommitted Snapshot Isolation Read Committed Snapshot Isolation Repeatable Read Snapshot Isolation Serializable Snapshot Isolation Ignore all locking hints
Result
Blocking and deadlock between Reporting workload (i.e. Query) and REDO thread is eliminated No issues with DML (INSERT/DELETE/UPDATE) as it is not allowed Will incur additional cost of row versioning.
demo
Readable Secondary
Secondary
Backups
Primary Secondary
Backups can be done on any replica of a Backups database Backups on primary replica still works Log backups done on all replicas form a single log chain Backups Database Recovery Advisor makes restores simple
demo
Backup from Secondary
Key Enhancements
Fast instance failover through predictable database recovery time Native support for multi-site clustering across subnets enable DR using failover cluster instances Flexible Failover Policy
Eliminates false failover Configurable failure condition levels Better diagnostics
Diagnostics
Configurable options eliminate false failover Improved logging for better diagnostics
Support for rolling upgrade and patching of SQL Server for both Availability Groups and Failover Cluster Instance Fast failover time for both Availability Groups and Failover Cluster Instances New online operations supported
LOB Index Adding of column with default
KB 2494036 - A hotfix is available to let you configure a cluster node that does not have quorum votes in Windows Server 2008 and in Windows Server 2008 R2
Supports configuring optimal quorum with non-automatic failover targets
All nodes should be in the same AD domain To create WFSC cluster user running creation must have:
Domain account Administrator on all machines Have Create Computer objects and Read All Properties rights in AD
Quorum Configuration
Quorum: need majority of votes to operate and avoid split brain Two-Steps process:
1. Select nodes to vote (KB 2494036)
1 vote if nodes that host a replica that is currently: 0 votes for rest of nodes
Primary (if primary is an FCI include all possible owner nodes for that FCI) An auto failover target if the primary is also configured for auto failover
2.
Odd number of votes, use Node Majority Even number of votes, add a witness by either:
Adding an additional witness node and use Node Majority Using Node and File Share Majority with a protected file share (blog with details)
Re-evaluate and adjust quorum after manual failover outside automatic target
demo
Disaster Recovery
New Topology
A A A
A
Reports Backups
Synchronous Data Movement Asynchcronous Data Movement
Resources Links
Denali AlwaysOn Resource Center: http://msdn.microsoft.com/en-us/sqlserver/gg490638(enus,MSDN.10)
RCO download (available soon) Documentation MSDN forums Microsoft Connect AlwaysOn Blog
High Availability
SQL Server AlwaysOn Reliable, Integrated Failover Detection Application Centric Failover Multiple Secondaries Readable Secondaries Online Operations HA for StreamInsight Windows Server Core Support
Beyond Relational
Microsoft Project Juneau Win32 Access to Database files FileTable Semantic Search Platform Full Globe Spatial Support DAC Enhancements ODBC for Linux Hybrid Applications with SQL Azure
Business Intelligence
Unified Semantic Model Crescent
EIM
SSIS Server
Data Quality
Sysprep for AS
Thank You
2008 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.