Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sql server 2012 ha dr 24_hop_final

1,524 views

Published on

24 Hours of PASS SQL 2012 Always On HA and DR

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Sql server 2012 ha dr 24_hop_final

  1. 1. Professional Association for SQL ServerSQL Server 2012High Availability and DRJoey D’Antoni2200 GMT
  2. 2. Thank You to our Sponsors
  3. 3. About Me• @jdanton on Twitter• Principal Architect SQL Server, Comcast Cable• Joedantoni.wordpress.com• Videos and Blogs at SSWUG.org• Vice President of the Philadelphia SQL Server User Group – SQL Saturday #121 Philadelphia—June 9th
  4. 4. Agenda• SQL Server 2008 to 2012—What’s Changed in HA and DR• Geo-Clustering• All about Availability Groups
  5. 5. Learning Objectives• SQL Server HA and DR• What’s involved in SQL Clustering• How clustering and Availability Groups work• What’s new in 2012 HA/DR
  6. 6. Licensing (What’s New)• The Availability Group features will require the Enterprise Edition of SQL Server• The licensing model for SQL Enterprise Edition has changed. Consult your friendly Microsoft sales representative for more details• AlwaysOn read-only replicas will need to be licensed
  7. 7. Windows Core Support• No GUI version of Windows• Allows for fewer patches• Uses PowerShell and MMCs for support
  8. 8. Windows Core
  9. 9. High Availability (HA) and DisasterRecovery (DR) Options in SQL 2008 • Backup and Recovery • Failover Cluster Instances (FCI) • Mirroring • Log Shipping • Replication • SAN Replication* • Virtualization*
  10. 10. High Availability (HA) and DisasterRecovery (DR) Options in SQL Server 2012• Backup and Recovery• Failover Cluster Instances (FCI)• Mirroring• Availability Groups (2012)• Log Shipping• Replication• SAN Replication*• Virtualization*
  11. 11. What’s new in SQL Server 2012 HA/DR• AlwaysOn Availability Groups• SMB Support for Failover Cluster Instances• Multi-subnet clustering is supported• Flexible Failover
  12. 12. SQL Server Failover ClusteringArchitecture
  13. 13. SQL Failover Clustering in 2008• SQL Clustering required 1 subnet to be used across the whole cluster• Cluster failover is controlled by isAlive/looksAlive processes, which check the SQL service and run @@servername
  14. 14. SQL Failover Clustering in 2012• Full support for geo-distributed clusters• SMB Storage (File Shares) Supported for FCI• Flexible failover model based on sp_server_diagnostics• TempDB on Non-shared Disk Resource – Makes PCI-based Solid State Drive an option
  15. 15. Quorum It’s not just bad cologne anymore
  16. 16. Quorum Are you there? Why Yes I am here
  17. 17. Understanding Quorum• There are a several slides on this topic—it is critical! – In a nutshell, you cluster has to be able to talk to itself to keep the cluster service up in running – This applies to both SQL Server Failover Cluster Instances and AlwaysOn Availability Groups
  18. 18. Quorum• Quorum is critical—contains master copy of the cluster’s configuration• Serves as a tiebreaker if network communications between cluster nodes fail• If Quorum fails—cluster is shut down until it’s restored
  19. 19. Quorum Models• Node and Disk Majority (Default)• Node Majority• No Majority (Quorum Disk Only)• Node and File Share Majority (Good for Geo Clusters)
  20. 20. Quorum Failure Tolerance Number of Nodes 2 3 4 5 6 7 Node Majority 0 1 1 2 2 3 Node and Disk/File Share Majority 1 2 2 3 3 4 • Assuming Disk is Up Calculation is: Cluster Up = RoundUp(Total # of Nodes/2) • Assuming Disk is Down Calculation is: ClusterUp = RoundUp (Total # of Nodes/2)-1
  21. 21. Why Do Clusters Failover? • Initiated by failures in hardware or software • Checked by isAlive/LooksAlive processes (in 2008R2 and below)
  22. 22. Flexible Failover—New for 2012• Replaces looksAlive/isAlive functionality in SQL Clusters (and is used for Availability Groups)• Now runs sp_server_diagnostics – Accepts two parameter • HealthCheckTimeout (Default 60 sec/Minimum 15 sec) • Failover Condition Level
  23. 23. Flexible Failover Policies forClusters Level Condition Description No automatic • Indicates that no failover or restart will be 0 failover or restart triggered automatically on any failure conditions. Failover or restart 1 • SQL Server service is down. on server down • SQL Server instance is not responsive (Resource Failover or restart DLL cannot receive data from 2 on server sp_server_diagnostics within the unresponsive HealthCheckTimeout settings). Failover or restart • System stored procedure sp_server_diagnostics 3 (Default) on critical server returns ‘system error’. (Critical errors > 20) errors Failover or restart • System stored procedure sp_server_diagnostics 4 on moderate server returns ‘resource error’. (Moderate errors > 17) errors Failover or restart • System stored procedure sp_server_diagnostics 5 on any qualified returns ‘query_processing error’. (Deadlock) failure conditions
  24. 24. What is Stretch Clustering• Also known as Geo-Clustering
  25. 25. Geo Cluster
  26. 26. Geo-Distributed Clustering• Requires SAN replication ($$$$)• Two of everything• Requires really fast network connection• Requires some trickery at the network/DNS level for connectivity• Witness Disk (Quorum) – Can be physical (SAN) disk, or cluster file share
  27. 27. Geo-distributed Failover Clustering• Was available in SQL 2008, but easier to implement in 2012• Won’t be used by most organizations due to cost and complexity
  28. 28. Review—DR Options in SQL 2008• Mirroring – Allowed automatic failover, but only one target – Mirror target is unreadable• Log Shipping – Allowed multiple targets, but failover a manual process, requiring a connection string change• Replication
  29. 29. AlwaysOn Availability Groups
  30. 30. AlwaysOn Requirements• Windows Enterprise (Clustering is a requirement)• SQL Server Enterprise Edition• Windows Cluster• No shared storage is required• Quorum Disk (File Share if multi-site or local storage)
  31. 31. AlwaysOn Architecture
  32. 32. Flexible AG Failover• Similar to how a failover clustered instance fails over• Connects to instance every 30 seconds to perform health check• Also, similar quorum model to Windows Failover Clustering
  33. 33. Allows for SAN-Less HA/DR• This is not a huge thing for SQL Server in larger organizations, but big win for medium sized businesses• Allows much easier native SQL DR in Virtual Environments
  34. 34. Considerations for Availability Groups• All SQL servers (including the secondary in the DR site) in the same Windows domain• All the databases must be in FULL recovery model• The unit of failover (for local HA, as well as DR) is at the AG level, i.e., group of databases – not the instance
  35. 35. Failover Scenarios Synchronous- Synchronous- Asynchronous- commit mode with commit mode with commit mode manual-failover automatic-failover mode mode Automatic failover No No Yes Manual failover No Yes Yes Forced failover Yes Yes No
  36. 36. Read Only Replicas• Can have up to 3• SQL Client 2012 will allow for this routing specifically• Can take backups from read-only copies* – Copy Only Backups (only full copy, does not affect primary log)• Indexing must be same on replicas• Bad queries can affect status of replica
  37. 37. Client Connections in This Model• Availability Group Listener – Works just like a failover clustering instance (single instance, single IP) – Creates a VCO (AD Virtual Computer Object)—similar to a cluster virtual object• Read-only Connections – Requires 2012 native ODBC client
  38. 38. Client Connections
  39. 39. Client Connections• Always specify Multi-Subnet Failover=True in listener connection• From Books Online “will significantly reduce failover time for single and multi-subnet AlwaysOn topologies.”• SQL Server Failover Cluster Instances as well
  40. 40. Turning On AlwaysOn
  41. 41. Availability Groups Demo
  42. 42. Summary• Lots of Change in the HA/DR Space• Licensing also changes—talk to your MS rep• SQL Server Failover Clusters still a good HA option• AlwaysOn Availability Groups add a lot more flexibility to DR
  43. 43. Contact Info• Twitter: @jdanton• jdanton1@yahoo.com• Blog: joedantoni.wordpress.com
  44. 44. Thank You to our Sponsors

×