AlwaysOn Availability Groups 101

Slides:



Advertisements
Similar presentations
SQL Server AlwaysOn: Active Secondaries Luis Vargas Program Manager Microsoft Corporation DBI312.
Advertisements

Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)
0 SQL Server AlwaysOn – SharePoint 2013 High Availability and Disaster Recovery Sal Bawany, Solutions Architect
Lesson 1: Configuring Network Load Balancing
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
1 ISA Server 2004 Installation & Configuration Overview By Nicholas Quinn.
Module 13: Configuring Availability of Network Resources and Content.
INSTALLING MICROSOFT EXCHANGE SERVER 2003 CLUSTERS AND FRONT-END AND BACK ‑ END SERVERS Chapter 4.
Module 1: Installing and Upgrading to Exchange Server 2003.
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
SQLCAT: SQL Server 2012 AlwaysOn Lessons Learned from Early Customer Deployments Sanjay Mishra Program Manager Microsoft Corporation DBI360.
SQLintersection Session SQL37 SQL Server 2012 Availability Groups Aaron Bertrand
Unified solution Easy to configure, manage, and monitor Reuse existing investments SAN/DAS environments Allow using HA hardware resources Fast seamless.
SQL2005 Cluster Build. IP Request Request 6 IP Addresses – One for EACH SQL virtual server (2) – One for the cluster – One for Distributed Transaction.
SQLCAT: SQL Server HA and DR Design Patterns, Architectures, and Best Practices Using Microsoft SQL Server 2012 AlwaysOn Sanjay Mishra Program Manager.
1 Week #10Business Continuity Backing Up Data Configuring Shadow Copies Providing Server and Service Availability.
Speaker Name 00/00/2013. Solution Requirements.
Alwayson Availability Groups
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
Virtual Machine Movement and Hyper-V Replica
SQL Server 2012: AlwaysOn HA and DR Design Patterns, and Lessons Learned from Early Customer Deployments Sanjay Mishra SQLCAT.
Narasimha Reddy Gopu Jisha J. Agenda Introduction to AlwaysOn * AlwaysOn Availability Groups (AG) & Listener * AlwaysOn Failover * AlwaysOn Active Secondaries.
SQL Server 2014 AlwaysOn Step-by-Step SQL Server 2014 AlwaysOn Step-by-Step A hands on look at implementing AlwaysOn in SQL Server 2014.
What HADR Option(s) Are Right For You?. Where’s The AlwaysOn?
SQL Server High Availability Introduction to SQL Server high availability solutions.
All the things you need to know before setting up AlwaysOn Michael Steineke SQL & BI Solution Lead Enterprise Architect Concurrency, Inc.
Windows Server Failover Clustering (WSFC) with SQL Server.
Upgrade on Windows 7. DownloadSoftware Download Software from link provided in Webliography: e/
FUN WITH AVAILABILITY GROUPS Christopher Wolff SQL Server Database Engineer, Xero.
Architecting Availability Groups An analysis of Microsoft SQL Server Always-On Availability Group architectures 1.
1 Remote Installation Service Windows 2003 Server Prof. Abdul Hameed.
High Availability & Disaster Recovery with SQL Server AlwaysOn Availability Groups Turgay Sahtiyan Microsoft – Senior SQL Server PFE
ALWAYSON AVAILABILITY GROUPS Replicas, Listeners & Quorums, Oh My! Kevin Howell SQL Saturday #517 Philadelphia, June 2016.
Architecting Enterprise Workloads on AWS Mike Pfeiffer.
SQL Database Management
Introduction to Clustering
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
SQL Server AlwaysOn Availability Groups DrillDown
Welcome to SharePoint Saturday Houston
(ITI310) SESSIONS 8: Network Load Balancing (NLB)
Architecting Availability Groups
ALWAYSON AVAILABILITY GROUPS
Disaster Recovery Where to Begin
Always On Availability Groups
Always on HA SQL Server Always ON feature is the new comprehensive high availability and disaster recovery solution which increases application availability.
Deploying and Configuring SSIS Packages
Contained DB? Did it do something wrong?
SQL AlwaysOn Availability Groups
Required 9s and data protection: introduction to sql server 2012 alwayson, new high availability solution Santosh Balasubramanian Senior Program Manager.
IIS.
Introduction to Clustering
Disaster Recovery Where to Begin
Architecting Availability Groups
What’s new in SQL Server 2016 Availability Groups
Planning High Availability and Disaster Recovery
Example of a page header
SYED SAJID WASIM SQL SERVER ALWAYS ON Step by Step.
SQL Server on Linux: High Availability And Disaster Recovery
Distributed Availability Groups
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Distributed Availability Groups
04 | Always On High Availability
Distributed Availability Groups
Distributed Availability Groups Praveen Kumar. What we will cover Availability group refresher The HA/DR solution Distributed availability groups – what.
Distributed Availability Groups
ZORAN BARAC DATA ARCHITECT at CIN7
SQL AlwaysOn Availability Groups
Designing Database Solutions for SQL Server
Presentation transcript:

AlwaysOn Availability Groups 101 Using SQL Server 2012

About Me Jeff Reinhard 20 years database development experience @jreiny Jeff@Reinhard.com Employment Highlights: Ernst & Young Internet Security Systems/IBM AirWatch WebMD CheckFree 2 | 9/18/2018 | AlwaysOn Availability Groups 101

Pyramid Analytics Thank You Microsoft for the facility For sponsoring tonight’s event: Pyramid Analytics 3 | 9/18/2018 | AlwaysOn Availability Groups 101

Agenda What is AlwaysOn Prerequisites Setting Up Monitoring AlwaysOn and Your Application Lessons Learned Q&A 34 slides, so I need to move fast 4 | 9/18/2018 | AlwaysOn Availability Groups 101

Two Types of AlwaysOn ??? AlwaysOn Failover Cluster Instances leverages Windows Server Failover Clustering (WSFC) functionality to provide local high availability through redundancy at the server-instance level—a failover cluster instance (FCI). Previously known as SQL Clusters Works with SQL Server Standard Edition AlwaysOn Availability Groups (AG) This presentation discusses further Requires SQL Server Enterprise Edition 5 | 9/18/2018 | AlwaysOn Availability Groups 101

What Is AlwaysOn AG? AlwaysOn is SQL Servers best available technology for SQL High Availability. AlwaysOn is a new integrated, flexible, cost-efficient high availability and disaster recovery solution. It can provide data and hardware redundancy within and across data centers, and improves application failover time to increase the availability of your mission-critical applications. AlwaysOn provides flexibility in configuration and enables reuse of existing hardware investments. The principal goal of a high availability solution is to minimize or mitigate the impact of downtime. It is recommended for scenarios where high availability is required and the application will benefit from readable copies of the primary databases. 6 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Architecture Overview 7 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites – Before you begin Prerequisites, Restrictions, and Recommendations for AlwaysOn Availability Groups http://msdn.microsoft.com/en-us/library/ff878487.aspx   AlwaysOn Failover http://msdn.microsoft.com/en-us/library/ff929171.aspx Do not use the Failover Cluster Manager to manipulate availability groups, for example: Do not add or remove resources in the clustered service (resource group) for the availability group. Do not change any availability group properties, such as the possible owners and preferred owners. These properties are set automatically by the availability group. Do not use the Failover Cluster Manager to move availability groups to different nodes or to fail over availability groups. The Failover Cluster Manager is not aware of the synchronization status of the availability replicas, and doing so can lead to extended downtime. You must use Transact-SQL or SQL Server Management Studio. 8 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites – Before you begin (cont.) AlwaysOn Quorum Resources http://blogs.msdn.com/b/sqlalwayson/archive/2012/03/13/quorum-vote-configuration-check-in-alwayson-availability-group-wizards-andy-jing.aspx http://msdn.microsoft.com/en-us/library/hh270280.aspx http://msdn.microsoft.com/en-us/library/hh270281.aspx http://technet.microsoft.com/en-us/library/cc770620(v=ws.10).aspx Connecting with multi-subnet failover http://msdn.microsoft.com/en-us/library/hh205662.aspx http://technet.microsoft.com/en-us/library/ff878716.aspx Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server) - http://technet.microsoft.com/en-us/library/hh213417.aspx Creating a listener http://technet.microsoft.com/en-us/library/hh213080.aspx Prerequisites and requirements Only one listener can be created though SQL Server.  If you need an additional listener, it can be created thought WSFC. Recommendation, use a static IP for multiple subnet configurations. You must be connected to the instance that hosts that primary replica If using static IP addresses, the listener will have a static IP  for each subnet that has a replica. Configure Read-Only Routing for an AG http://technet.microsoft.com/en-us/library/hh710054.aspx 9 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites - Windows Cluster Go into Server Manager, features, add features 10 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites - Windows Cluster (cont.) Enable Failover Clustering Make sure cluster services are available on all participating nodes 11 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites - Windows Cluster (cont.) Add the database servers to the cluster Run validations, tests, etc. Some warnings are due to no storage available to the cluster, which is correct for AlwaysOn. Create the cluster Create Active Directory computer account for cluster name 12 | 9/18/2018 | AlwaysOn Availability Groups 101

Prerequisites – SQL Server Configuration Open SQL Server Configuration Manager Select SQL Server Services, right click on SQL Server, select properties 13 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Set Up 14 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Overview Working Primary Node Available “blank slate” secondary Create Availability Group Select Databases Specify Replicas Create the AG Listener Select full data synchronization Run the wizard Configure Read Only Routing 15 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Working Primary Node Ensure your application is working properly Review logins and users and permissions Using Contained databases is recommended but not required If not using contained databases, export the logins http://support.microsoft.com/kb/918992 16 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Available “blank slate” secondary Secondary Node(s) should match the primary in configuration, version, etc. Make sure the databases and files on the primary do not exist on the secondary If not using contained databases, import the logins used by the application. Don’t import default and windows authentication accounts It is vital that the login SIDS match between the primary and secondary node(s) 17 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Create Availability Group Using SSMS, from your primary database node, start the New Availability Group Wizard and give it a name 18 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Select Databases Select all of the databases that work together as a set for your application; possibly including Reporting Services database(s). 19 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Specify Replicas The wizard will select your primary node, add your secondary node(s) 20 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Specify Replicas (cont.) For all, select Synchronous, Automatic Failover, Readable Secondary = Yes 21 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Create the AG Listener On the listener tab, enter name and port 1433, then click add for IP 22 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Setup - Create the AG Listener (cont.) Enter the IP address for the listener 23 | 9/18/2018 | AlwaysOn Availability Groups 101

Select full data synchronization Create the folder, preferably on a secondary node, then enter into the wizard 24 | 9/18/2018 | AlwaysOn Availability Groups 101

Run the wizard Perform the validation, next, then finish to create the AG 25 | 9/18/2018 | AlwaysOn Availability Groups 101

Configure Read Only Routing I have a script that with the setting of a few variables, will generate the code to perform the configuration. Contact me and provide payment if interested. http://www.sqlservercentral.com/scripts/AlwaysOn/116992/ What is important after configuration Endpoint_url uses DNS name and port 5022 Available mode is synchronous Failover mode is automatic 26 | 9/18/2018 | AlwaysOn Availability Groups 101

Configure Read Only Routing (cont.) What is important after configuration (cont.) Primary role allow connections is ALL Secondary role allow connections is READ_ONLY ReadOnly Routing URL is IP and port 1433 27 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Monitoring - Dashboard The first place to start is the dashboard 28 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Monitoring – Top Section Look for any errors, warnings, check that failover mode is automatic, AG group state is healthy, check the links on the right for any errors or warnings 29 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Monitoring - Replicas Check the health icon, failover mode is automatic, synchronization state is good, and no issues reported 30 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Monitoring - Databases Check the primary and secondary, health state, synchronization state, failover readiness, issues 31 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Monitoring (cont.) There are many DMV queries that can be used Microsoft SQL Server 2012 AlwaysOn Monitoring Management Pack AlwaysOn Availability Groups Troubleshooting and Monitoring Guide http://technet.microsoft.com/en-us/library/dn135328(v=sql.110).aspx 32 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn and Your Application The connection strings should all go to the listener, not directly to any database server instance To have your application use the primary mode, no change is required in your connection string To have your application use a readable secondary, add to the connection string: ;ApplicationIntent=ReadOnly 33 | 9/18/2018 | AlwaysOn Availability Groups 101

AlwaysOn Lessons Learned Request the DNS name and IP for windows cluster and Availability Group Listener early, they can take a while Research prerequisites, make sure all patches, versions, components are optimal to support AlwaysOn Schedule and plan out in advance, get key players on board in the beginning Schedule implementation in two phases: Configuration of clusters, storage, SQL server stand alone instances Implementation of AlwaysOn 34 | 9/18/2018 | AlwaysOn Availability Groups 101

Bonus Trick ALTER DATABASE [XXXXX] SET HADR RESUME; Sometimes, when a database is in the state of “not synchronizing”, and all other issues have been resolved, running the below command might get it back to healthy: ALTER DATABASE [XXXXX] SET HADR RESUME; 35 | 9/18/2018 | AlwaysOn Availability Groups 101

Thank you for your time! Questions? 9/18/2018 | 9/18/2018 | AlwaysOn Availability Groups 101