High Availability and Disaster Recovery(HDAR) for SQL Server in Microsoft Azure Virtual Machines
Microsoft Azure virtual machines (VMs) with SQL Server can help reduce the cost of high availability and disaster recovery (HADR) database solution. Azure virtual machines support most of the SQL Server HADR solutions, both as Azure-only and as hybrid solutions. In an Azure-only solution, the entire HADR system runs in Azure. In the hybrid configuration, part of the solution runs in Azure and the other part runs on-premises in our organization. The flexibility of the Azure environment enables you to move partially or completely to Azure to satisfy the budget and HADR requirements of your SQL Server database systems.
It is up to us to ensure that our database system possesses the HADR capabilities that the service-level agreement (SLA) requires. The fact that Azure provides high availability mechanisms, such as service healing for cloud services and failure recovery detection for Virtual Machines, does not itself guarantee you can meet the desired SLA. These mechanisms protect the high availability of the VMs but not the high availability of SQL Server running inside the VM. It is possible for the SQL Server instance to fail while the VM is online and healthy. Moreover, even the high availability mechanisms provided by Azure allow for the downtime of the VMs due to events such as recovery from software or hardware failures and operating system upgrades.
HADR deployment architectures
SQL Server HADR technologies that are supported in Azure include:
• Always On Availability Groups
• Always On Failover Cluster Instances
• Log Shipping
• SQL Server Backup and Restore with Azure Blob Storage Service
• Database Mirroring – Deprecated in SQL Server 2016
Azure-only: High availability solutions
We can have a high availability solution for SQL Server at a database level with Always On Availability Groups – called availability groups. You can also create a high availability solution at an instance level with Always On Failover Cluster Instances – failover cluster instances. For additional redundancy, you can create redundancy at both levels by creating availability groups on failover cluster instances.
As an Examples: For the Availability groups: Availability replicas running in Azure VMs in the same region provide high availability. You need to configure a domain controller VM because Windows failover clustering requires an Active Directory domain.
Failover cluster instances: Failover Cluster Instances (FCI), which require shared storage, can be created in 3 different ways
Azure: Disaster Recovery Solutions
• Database Mirroring: Principal and mirror and servers running in different datacenters for disaster recovery. You must deploy using server certificates because an active directory domain cannot span multiple datacenters.
• Backup and Restore with Azure Blob Storage Service:
Production databases backed up directly to blob storage in a different datacenter for disaster recovery.
• Replicate and Failover SQL Server to Azure with Azure Site Recovery:
Production SQL Server of one Azure datacenter replicated directly to Azure Storage of different Azure datacenter for disaster recovery.