All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
Terminology and Architecture AlwaysOn Marketing name for the high availability features in SQL Server Includes Fail over Cluster Instances (FCI) Availability Groups (AG) Windows Server Failover Clustering (WSFC) All of AlwaysOn uses WSFC
High Availability vs. Disaster Recovery High Availability Generally same site Quick Recovery Disaster Recovery Separate Site Slower Recovery
Site to Site Considerations How far apart are they? What is the connectivity between sites? Type of connection Size of connection Latency of connection
Networking Server to server connectivity Ports to open on Firewalls TCP Ports 1433 & 1434 or specific SQL ports AG Endpoint – tcp 5022 IP Addresses DNS Names & IP Addresses Servers, Cluster Name, AGs
Windows Clustering What do I need to know as a DBA? Management Windows Failover Cluster Manager PowerShell Windows Domain Joined Authentication SQL Server needs to run as a Domain Account Connectivity DNS Names and SQL Instances Availability Group Listener Ports Quorum
Why do I care about Quorum? Quorum Controls if the Cluster in Online Majority of votes What can vote? Shared Disk Servers – Active, Passive or Witness File Share – Witness Manual Voting override is available In Multi-Site configurations you need to decide where the voting members are located
Windows Server Version & Clustering Windows Server 2012 R2 Many useful updates to clustering Dynamic Quorum Cluster automatically controls Voting Adjusts the vote weight of each node Allows for Last Man Standing Network Resiliency Key to making sure the Cluster is healthy
Cluster Network Objects Computers in AD AD OU Permissions Cluster and Listener Objects in AD
OU Delegation Create an OU and Delegate to the Cluster Account
SQL Server Version Comparison SQL 2012 Enterprise Multiple Node FCI Multi-Subnet Clusters AG’s – 5 Copies of Data 4 Secondaries Total 2 Synchronous Up to 4 Asynchronous 2 Automatic Failover Targets Readable Secondaries SQL 2014 Enterprise Multiple Node FCI Multi-Subnet Clusters AG’s – 8 Copies of Data 7 Secondaries 2 Synchronous Up to 7 Asynchronous 2 Automatic Failover Targets Readable Secondaries Azure Replica Backup to Azure Site Survivability for Read Intent
FCI or AG? If you need MSDTC, AGs don’t support MSDTC AGs require separate Disk for each Instance AGs can fail from node to node faster than FCI Synchronous AGs require transactions to commit(log harden) on both servers AG Secondaries can do workload Backup & Read-only Answer – It depends on your needs You might want to combine them!
MSDTC In Windows 2008 and later you either Create a clustered instance of the MSDTC resource for EVERY SQL Server instance /Group that requires its functionality or DO NOT CLUSTER MSDTC at all View msdtc mappings msdtc -tmMappingView *
Availability Group Setup Shared Backup location Permissions on share Full on SQL Server Account
Multiples – Instances, AGs You can have multiple AGs in an instance Listeners are tied to AG Multiple Instances Each AG needs different ports for the endpoints AG’s on Private Network
Multi-subnet DNS Client App connectivity d-multisubnet-listener-behavior-with-newly-released-sql-client- provider-in-net-4-6-1/ d-multisubnet-listener-behavior-with-newly-released-sql-client- provider-in-net-4-6-1/ JDBC - us/library/gg558121(v=sql.110).aspxhttps://msdn.microsoft.com/en- us/library/gg558121(v=sql.110).aspx Azure Listener readintent-routing-with-azure-alwayson-availability-group-listener/ readintent-routing-with-azure-alwayson-availability-group-listener/
Enabling AGs
What you need before the Wizard Network Names Cluster name Listener Name Firewall Rules/ports open Listener AG IP Addresses Each Server Cluster Name Each Listener Active Directory Permissions or Objects staged Servers in OU File System Location of DB Files Shared Backup Location
Useful Reference Links SQL AlwaysOn Team Blog SQL Server Customer Advisory Team SQL Server 2014 Technet Reference SQL High Availability on MSDN Failover Cluster Guide to Quorum Prestage Computer Objects in AD MSDTC AGs on Private Network SQL 2016 Changes to AGs
Thanks!