az sql instance-failover-group

Manage SQL Instance Failover Groups.

Commands

az sql instance-failover-group create Creates an instance failover group between two connected managed instances.
az sql instance-failover-group delete Deletes a failover group.
az sql instance-failover-group set-primary Set the primary of the instance failover group by failing over all databases from the current primary managed instance.
az sql instance-failover-group show Gets a failover group.
az sql instance-failover-group update Updates the instance failover group.

az sql instance-failover-group create

Creates an instance failover group between two connected managed instances.

az sql instance-failover-group create --mi
--name
--partner-mi
--partner-resource-group
--resource-group
[--failover-policy {Automatic, Manual}]
[--grace-period]
[--subscription]

Required Parameters

--mi --source-mi

Name of the Azure SQL managed instance.

--name -n

The name of the Instance Failover Group.

--partner-mi

The name of the partner managed instance of a Instance Failover Group.

--partner-resource-group

The name of the resource group of the partner managed instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--failover-policy

The failover policy of the Instance Failover Group.

accepted values: Automatic, Manual
default value: Automatic
--grace-period

Interval in hours before automatic failover is initiated if an outage occurs on the primary server. This indicates that Azure SQL Database will not initiate automatic failover before the grace period expires. Please note that failover operation with --allow-data-loss option might cause data loss due to the nature of asynchronous synchronization.

default value: 1
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az sql instance-failover-group delete

Deletes a failover group.

az sql instance-failover-group delete --location
--name
--resource-group
[--subscription]

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

The name of the Instance Failover Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az sql instance-failover-group set-primary

Set the primary of the instance failover group by failing over all databases from the current primary managed instance.

az sql instance-failover-group set-primary --location
--name
--resource-group
[--allow-data-loss]
[--subscription]

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

The name of the Instance Failover Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--allow-data-loss

Complete the failover even if doing so may result in data loss. This will allow the failover to proceed even if a primary database is unavailable.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az sql instance-failover-group show

Gets a failover group.

az sql instance-failover-group show --location
--name
--resource-group
[--subscription]

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

The name of the Instance Failover Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az sql instance-failover-group update

Updates the instance failover group.

az sql instance-failover-group update --location
--name
--resource-group
[--add]
[--failover-policy {Automatic, Manual}]
[--force-string]
[--grace-period]
[--remove]
[--set]
[--subscription]

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name -n

The name of the Instance Failover Group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--failover-policy

The failover policy of the Instance Failover Group.

accepted values: Automatic, Manual
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--grace-period

Interval in hours before automatic failover is initiated if an outage occurs on the primary server. This indicates that Azure SQL Database will not initiate automatic failover before the grace period expires. Please note that failover operation with --allow-data-loss option might cause data loss due to the nature of asynchronous synchronization.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.