Download presentation
Presentation is loading. Please wait.
0
High Availability & Disaster Recovery with SQL Server 2012 AlwaysOn Availability Group
Turgay Sahtiyan Microsoft – Senior SQL Server PFE © 2012 Microsoft Corporation Microsoft Confidential
1
Turgay Sahtiyan Istanbul, Turkey
Microsoft Turkey - Senior SQL Server Premier Field Engineer +12 years IT experience / Last 8 years SQL Server Key areas : HA&DR Solutions, Performance Tuning, PDW Community geek Founder and Former President of SQLPass Turkey Chapter Former SQL Server MVP Speaker / Writer / Presenter at SQLSaturdays & Local User Groups Social Media Twitter Blog : | Linkedin : © 2012 Microsoft Corporation Microsoft Confidential
2
Agenda Current HA&DR Solutions SQL Server AlwaysOn Availability Group
Limitations of Current HA/DR Solutions SQL Server AlwaysOn Availability Group Client Failover using Virtual Network Name Readable Secondary – ReadOnly Routing Backup on Secondary Replicas Availability Group Scenarios Comparison of SQL Server HA&DR Solutions Demo – AlwaysOn Aavailability Group Real-Life Customer Scenario © 2012 Microsoft Corporation Microsoft Confidential
3
SQL Server High Availability
HA&DR solutions before SQL Server 2012 AlwaysOn Database Mirroring Failover Cluster Instance Log Shipping These features help the customer to reach enough HA&DR but.. Customers demand more Better Availability Higher ROI Simplicity © 2012 Microsoft Corporation Microsoft Confidential
4
Failover Cluster Instance level redundancy Local or Remote Site
Presents VNN Automatic Failover Does not protect against data loss Public SQL Server Instance SQL Server Instance Shared Storage © 2012 Microsoft Corporation Microsoft Confidential
5
Transaction Log Stream
Database Mirroring Witness Server Provide “a” redundant copy of database Local or remote side Works by sending TLog records Connections are accepted only to the principal database No VNN Automatic failover with Witness Server Principal Server Mirror Server Transaction Log Stream Principal Database Mirror Database Client © 2012 Microsoft Corporation Microsoft Confidential
6
Log Shipping © 2012 Microsoft Corporation Microsoft Confidential
7
Failover Clustering and Database Mirroring
Asynchronous Database Mirroring Secondary Data Center Primary Data Center SQL Server 2008 R2 Failover Cluster SQL Server 2008 R2 Failover Cluster Asynchronous Data Movement with Database Mirroring © 2012 Microsoft Corporation Microsoft Confidential
8
Database Mirroring and Log Shipping
Disaster Recovery Datacenter2 Primary Datacenter Log Shipping Witness SQL Server 2008 R2 Disaster Recovery Datacenter1 SQL Server 2008 R2 Database Mirroring SQL Server 2008 R2 Log Shipping Synchronous Data Movement with Database Mirroring © 2012 Microsoft Corporation Microsoft Confidential
9
Limitations of Current HA/DR Solutions
Solutions are fragmented Database mirroring does not allow multiple secondaries Multiple databases cannot fail over as a group Log shipping might lose data and does not fail over automatically Passive servers are mostly running idle Offloading of reporting and maintenance tasks from the primary server is not easy SAN is a single point of failure in failover clustering © 2012 Microsoft Corporation Microsoft Confidential
10
SQL Server AlwaysOn: Features
Availability Groups for Database Protection New in SQL Server 2012 with: Multiple database failover Multiple secondaries Active secondaries Fast application failover Integrated high-availability management AlwaysOn Failover Cluster Instances for Instance Level Protection Enhanced in SQL Server 2012 with: Multi-subnet clustering Flexible failover policies Improved diagnostics Faster failover TempDB on local drives Availability Groups and Failover Cluster Instances rely on Windows Server failover clustering, which provides a robust and reliable high-availability platform © 2012 Microsoft Corporation Microsoft Confidential
11
AlwaysOn Availability Groups
Secondary Data Center Primary Data Center Replica 4 Replica 3 A A Replica 1 Backups A Backups Reports Reports A Replica 2 Asynchronous Data Movement A Primary Replica Synchronous Data Movement A Secondary Replica © 2012 Microsoft Corporation Microsoft Confidential
12
Client Failover using Virtual Name
Availability Group Virtual Name allow applications to failover seamlessly on availability group failover Application reconnects using a virtual name after a failover to a secondary ServerA ServerB ServerC HRDB HRDB HRDB AGHR HRVNN Primary Secondary Primary Secondary Secondary Application retry during failover Connect to new primary once failover is complete and the virtual name is online -server HRVNN;-catalog HRDB © 2012 Microsoft Corporation Microsoft Confidential
13
Readable Secondary DB2 DB1 SQLservr.exe InstanceA Primary Secondary Database Log Synchronization InstanceB Reports Readable secondary allow offloading read queries to secondary Close to real-time data, latency of log synchronization impact data freshness Backup ve DBCC CheckDB operations can be done on secondary Auto-create statistics on the secondary replica but persist them in TempDB © 2012 Microsoft Corporation Microsoft Confidential
14
Active Secondary : Read-only Routing
ApplicationIntent – A New Connection Property Used to get access to secondary Applicable when Secondary Replica set with ALLOW_CONNECTIONS =READ_ONLY or YES (ALL) Connection String Connect to primary replica Server=myListener; Database=DB1; Connect directly to a secondary instance Server=myListener; Database=DB1; ApplicationIntent = ReadOnly Read-Only Routing Connection behavior optimized for automatic routing of read only applications to secondary You have to create the routes manually for this to work © 2012 Microsoft Corporation Microsoft Confidential
15
Active Secondary : Read-only Routing
© 2012 Microsoft Corporation Microsoft Confidential
16
Microsoft Confidential
Read-only Routing ServerA ServerB AGHR HRDB HRDB Primary Secondary HRVNN Reports OLTP -server HRVNN;-catalog HRDB -server HRVNN;-catalog HRDB; ApplicationIntent = ReadOnly Microsoft Confidential © 2012 Microsoft Corporation Microsoft Confidential
17
Microsoft Confidential
Read-only Routing ServerA ServerB AGHR HRDB HRDB Secondary Primary HRVNN Reports OLTP -server HRVNN;-catalog HRDB -server HRVNN;-catalog HRDB; ApplicationIntent = ReadOnly Microsoft Confidential
18
Backup on Secondary Replicas
Backups can be done on any replica of a database Log backups done on all replicas form a single log chain Backups on primary replica still works Supported backup types on secondary: Full - COPY_ONLY method is only one supported Availability Replica Transaction Log Differential - Not Supported Backup Preference Prefer Secondary Secondary Only Primary Any Replica sys.fn_hadr_backup_is_preferred_replica © 2012 Microsoft Corporation Microsoft Confidential
19
Availability Group Scenarios
Direct Attached Storage local, regional and geo secondaries Availability Group provides redundancy for databases on both standalone instances and failover cluster instances Shared Storage, regional and geo secondaries A Synchronize Asynchronize © 2012 Microsoft Corporation Microsoft Confidential
20
Microsoft Confidential
Comparison of SQL Server High-Availability and Disaster-Recovery Solutions Technology AlwaysOn Failover Clustering Instances AlwaysOn Availability Groups Database Mirroring Log Shipping Zero data loss * ** Instance Redundancy Database Redundancy Auto Failover Readable Copy *** **** Multiple Secondaries Note: Database mirroring is available and supported in SQL Server But AlwaysOn Availability Group is the primary high-availability and disaster-recovery feature for databases, and Microsoft plans for it to replace database-mirroring technology. Peer-to-peer replication is the primary solution for scenarios that need multi-site updates and multi-master replication. Log shipping is supported in SQL Server For additional information about support for database mirroring, see “Features Not Supported in a Future Version of SQL Server” ( Microsoft Confidential © 2012 Microsoft Corporation Microsoft Confidential
21
Demo myVNN Secondary Data Center Primary Data Center Replica 3 Reports
Synchronize Asynchronize A Secondary Data Center Primary Data Center Replica 3 Reports Replica 2 Replica 1 myVNN © 2012 Microsoft Corporation Microsoft Confidential
22
Real-Life Customer Scenario
Primary Data Center A FCI A Secondary Data Center A Reports Backups Backups Synchronize Asynchronize © 2012 Microsoft Corporation Microsoft Confidential
23
Microsoft Confidential
@turgaysahtiyan Microsoft Confidential © 2012 Microsoft Corporation Microsoft Confidential
24
Спонсоры
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.