Book Image

Professional SQL Server High Availability and Disaster Recovery

By : Ahmad Osama
Book Image

Professional SQL Server High Availability and Disaster Recovery

By: Ahmad Osama

Overview of this book

Professional SQL Server High Availability and Disaster Recovery explains the high availability and disaster recovery technologies available in SQL Server: Replication, AlwaysOn, and Log Shipping. You’ll learn what they are, how to monitor them, and how to troubleshoot any related problems. You will be introduced to the availability groups of AlwaysOn and learn how to configure them to extend your database mirroring. Through this book, you will be able to explore the technical implementations of high availability and disaster recovery technologies that you can use when you create a highly available infrastructure, including hybrid topologies. Note that this course does not cover SQL Server Failover Cluster Installation with shared storage. By the end of the book, you’ll be equipped with all that you need to know to develop robust and high performance infrastructure.
Table of Contents (9 chapters)
Professional SQL Server High Availability and Disaster Recovery
Preface

AlwaysOn AG Failover


A failover can be of two types:

  • An automatic failover, triggered as a result of the primary instance being unavailable or the availability databases being unavailable (when database level health detection is enabled)

  • A manual failover to a synchronous (zero data loss) or an asynchronous (data loss) replica

Let's now look at automatic and manual failover in detail.

Automatic Failover

In a real-world scenario, an automatic failover is triggered when a primary instance is unavailable, or any of the availability databases are unavailable (when database-level health detection is enabled).

Let's simulate a primary node failure and verify the automatic failover works. However, before that, let's just verify the configuration. To do this, you can open the Failover Cluster Manager and verify that all nodes are active and DPLPR is the owner of the DPLAG role.

Note

Connect to the DPLHA VM as we will shut down the DPLPR VM to simulate failure and trigger automatic failover.

Also, make sure...