Download presentation
Presentation is loading. Please wait.
Published byRosanna Marshall Modified over 9 years ago
1
SQL Server 2012 Always On Premier Field Engineer Microsoft Corporation Lisa Gardner http://blogs.msdn.com/sqlgardner
2
Understanding of High Availability Options in SQL Server 2012 Benefits of AlwaysOn HA design patterns utilizing AlwaysOn
3
Agenda High Availability Options AlwaysOn Demo Readable Secondaries Readable Secondaries Demo AlwaysOn Design Patterns
4
High Availability Options Pre-SQL Server 2012 What's New in SQL Server Failover Clustering? SQL Server 2012 AlwaysOn
5
Pre-SQL Server 2012 High Availability Options Backup/Restore Windows/SQL Server Failover Clustering Log Shipping Database Mirroring Third Party SAN Replication
6
AlwaysOn Technologies – Managed by WSFC WSFC AG FCI
7
What’s New in SQL Server Failover Clustering? AlwaysOn Failover Cluster Instance provides instance level failover Key SQL Server 2012 Clustering Enhancements Multi-site geo-clustering across subnets Flexible Failover Policy Improved system diagnostics Support for network attached storage(NAS) user SMB Support for TempDB on local drive (SSD)
8
Flexible Failover Policy (SQL Server 2012) Control over when automatic failover should be initiated Configurable options eliminate false failover Improved logging for better diagnostics New Cluster Properties HealthCheckTimeout FailureConditionLevel
9
Failure Condition Levels 0 – No Automatic Failover or restart Service is down 1 – Failover or restart on server down No response from sp_server_diagnostics 2 – Failover or restart on server unresponsive System errors 3 – Failover or restart on critical SQL Server errors Resource errors 4 – Failover or restart on moderate SQL Server errors Query Processing errors 5 – Failover or restart on any qualified failure conditions
10
Always On Availability Groups Allows a group of databases to failover as a logical unit Utilizes Windows Failover Cluster to report health Defines a primary instance and up to four secondary instances Provides automatic client redirection
11
AlwaysOn Concepts Availability Group Availability Replica Availability Database Availability Group Listener
12
SQL Server High Availability Options Recap High Availability and Disaster Recovery SQL Server Solution Potential Data Loss (RPO) Potential Recovery Time (RTO) Automatic Failover Readable Secondaries (1) AlwaysOn Availability Group – synchronous-commit ZeroSecondsYes (4) 0-2 AlwaysOn Availability Group – asyncronous-commit SecondsMinutesNo0-4 AlwaysOn Failover Cluster InstanceNA (5) Seconds- to minutes YesNA Database Mirroring (2) – High-safety (sync + witness) ZeroSecondsYesNA Database Mirroring (2) – High Performance (async) Seconds (6) Minutes (6) NoNA LogshippingMinutes (6) Minutes- to-hours (6) NoNot during a restore Backup Copy Restore (3) Hours (6) Hours-to- days (6) NoNot During a restore
13
Demonstration Creating an Availability Group
14
Readable Secondaries Mirrored copy of data on secondary server Active Secondary servers provide off-loading functionality Reading of data for reporting Backups DBCC Connect via Instance name
15
Active Secondary – Readable Routing Allows for application to specify read Intent on Connection ApplicationIntent – A New Connection Property Connect via listener Read-Only Routing Optimized for automatic routing of read only applications Routes must be create created manually
16
Readable Secondary – Data Latency Secondary reads are behind primary 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
17
Demonstration Leveraging Active Secondaries
18
Query Performance on Secondary SQL Server Uses Cost based optimizer Relies on object Statistics If statistics are missing SQL Server creates and persists Auto-stat on readable secondary will require updates?
19
Active Secondary : Enabling Backup on Secondary Backups can be done on any replica Must be able to communicate with primary Log backups done on all replicas form a single log chain Send all backups to a single UNC path Database Recovery advisor makes restores simple Must include backups from other instances manually Differential Backups are not supported Copy-Only backups are the only type I have a 4 part blog series on this topic for more detailsblog
20
AlwaysOn Troubleshooting AlwaysOn Dashboard Sp_server_diagnostics Catalog Views Examples Sys.availability_groups Sys.availability_replicas DMV are named sys.dm_hadr* New Performance Monitor Counter Objects SQLServer:Database Replica SQLServer:Availability Replica New Information Logged to the System Event Logs
21
AlwaysOn Design Patterns White Board/Flip Discussion
23
Conclusion AlwaysOn provides many High Availability Options Enables Multi Site Failover with minimal effort Allows maintenance and read activity to be distributed
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.