Dijeli putem


az sql instance-failover-group

Manage SQL Instance Failover Groups.

Commands

Name Description Type Status
az sql instance-failover-group create

Creates an instance failover group between two connected managed instances.

Core GA
az sql instance-failover-group delete

Deletes a failover group.

Core GA
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.

Core GA
az sql instance-failover-group show

Gets a failover group.

Core GA
az sql instance-failover-group update

Updates the instance failover group.

Core GA

az sql instance-failover-group create

Creates an instance failover group between two connected managed instances.

If an outage occurs on the primary server, the grace period indicates that Azure SQL Managed 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.

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

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
--secondary-type

Intended usage of the secondary instance in the Failover Group. Standby indicates that the secondary instance will be used as a passive replica for disaster recovery only.

Default value: Geo
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql instance-failover-group delete

Deletes a failover group.

az sql instance-failover-group delete --location
                                      --name
                                      --resource-group

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]

Required Parameters

--location -l

Location of the secondary instance in the Instance Failover Group. 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 of the secondary instance in the Instance Failover 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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql instance-failover-group show

Gets a failover group.

az sql instance-failover-group show --location
                                    --name
                                    --resource-group

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
                                      [--secondary-type]
                                      [--set]

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>.

Default value: []
--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.

Default value: False
--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 <indexToRemove> OR --remove propertyToRemove.

Default value: []
--secondary-type

Intended usage of the secondary instance in the Failover Group. Standby indicates that the secondary instance will be used as a passive replica for disaster recovery only.

--set

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

Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.