Implementing an auto-failover group for an Azure SQL database using PowerShell
An auto-failover group allows a group of databases to fail to a secondary server in another region if the SQL database service in the primary region fails. Unlike active geo-replication, the secondary server should be in a different region from the primary. The secondary databases can be used to offload read workloads. The failover can be manual or automatic.
In this recipe, we’ll create an auto-failover group, add databases to the auto-failover group, and perform a failover to the secondary server.
Getting ready
In a new PowerShell window, execute the Connect-AzAccount
command and follow the steps to log in to your Azure account.
You will need an existing Azure SQL database for this recipe. If you don’t have one, create an Azure SQL database by following the steps mentioned in the Provisioning and connecting to an Azure SQL database using PowerShell recipe of Chapter 5, Configuring...