Share via


az sql instance-failover-group-arc

Note

This reference is part of the arcdata extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az sql instance-failover-group-arc command. Learn more about extensions.

Manage Arc-enabled SQL managed instance Failover Groups.

Commands

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

Create a failover group resource.

Extension GA
az sql instance-failover-group-arc delete

Delete an Arc-enabled SQL Managed Instance failover group.

Extension GA
az sql instance-failover-group-arc list

List all failover groups.

Extension GA
az sql instance-failover-group-arc show

Show the details of a failover group resource.

Extension GA
az sql instance-failover-group-arc update

Update a failover group resource.

Extension GA

az sql instance-failover-group-arc create

Create a failover group resource.

Create an Arc-enabled SQL Managed Instance failover group resource to set up a distributed availability group.

az sql instance-failover-group-arc create --mi
                                          --name
                                          --partner-mi
                                          [--k8s-namespace]
                                          [--no-wait]
                                          [--partner-mirroring-cert-file]
                                          [--partner-mirroring-url]
                                          [--partner-resource-group]
                                          [--partner-sync-mode {async, sync}]
                                          [--primary-mirroring-url]
                                          [--resource-group]
                                          [--role {primary, secondary}]
                                          [--shared-name]
                                          [--use-k8s]

Examples

Use the Kubernetes API to create a failover group resource between primary SQL managed instance sqlmi1 and partner SQL managed instance sqlmi2.The partner mirroring endpoint and cert file are required.

az sql instance-failover-group-arc create --name fogcr --shared-name sharedname1 --mi sqlmi1 --role primary --partner-mi sqlmi2 --partner-mirroring-url 10.20.5.20:970 --partner-mirroring-cert-file ./sqlmi2.cer --use-k8s

Use Azure Resource Manager (ARM) to create a failover group resource.

az sql instance-failover-group-arc create --name fogcr  --mi sqlmi1 --resource-group primary-rg-name  --partner-mi sqlmi2 --partner-resource-group partner-rg-name --partner-sync-mode async

Use ARM to create a failover group with custom mirroring URLs.

az sql instance-failover-group-arc create --name fogcr  --mi sqlmi1 --resource-group primary-rg-name  --partner-mi sqlmi2 --partner-resource-group partner-rg-name --partner-sync-mode async --primary-mirroring-url 21.10.6.30:6603 --partner-mirroring-url 10.20.5.20:970

Required Parameters

--mi

The name of the primary SQL managed instance.

--name -n

The name of the failover group resource.

--partner-mi

The name of the partner SQL managed instance or remote SQL instance. When using ARM-targeted arguments, this refers to the Disaster Recovery (DR) instance name.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--k8s-namespace -k

Namespace where the failover group is to be deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--partner-mirroring-cert-file -f

The filename of mirroring endpoint public certificate for the partner SQL managed instance or availability group on remote SQL instance. Only PEM format is supported.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--partner-mirroring-url -u

The mirroring endpoint URL of the partner SQL managed instance.

--partner-resource-group

The Azure resource group of the DR partner Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--partner-sync-mode -m

The partner synchronization mode of the Arc-enabled SQL managed instance.

Property Value
Accepted values: async, sync
--primary-mirroring-url

The mirroring endpoint URL of the primary SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--resource-group -g

The Azure resource group of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--role

The requested role of the failover group. The role can be changed.

Property Value
Accepted values: primary, secondary
--shared-name

The shared name of the failover group for this SQL managed instance. Both the primary SQL managed instance and its partner must use the same shared name.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--use-k8s

Create the Arc-enabled SQL managed instance failover group using local Kubernetes APIs.

Property Value
Parameter group: Kubernetes API – targeted Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az sql instance-failover-group-arc delete

Delete an Arc-enabled SQL Managed Instance failover group.

az sql instance-failover-group-arc delete --name
                                          [--k8s-namespace]
                                          [--mi]
                                          [--resource-group]
                                          [--use-k8s]

Examples

Delete a failover group resource using the Kubernetes API.

az sql instance-failover-group-arc delete --name fogcr --use-k8s

Delete a failover group resource using Azure Resource Manager.

az sql instance-failover-group-arc delete --name fogcr --mi sqlmi1 -g rg-name

Required Parameters

--name -n

The name of the failover group resource to delete.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--k8s-namespace -k

Namespace where the failover group is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--mi

The name of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--resource-group -g

The Azure resource group of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--use-k8s

Use local Kubernetes APIs to perform this action.

Property Value
Parameter group: Kubernetes API – targeted Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az sql instance-failover-group-arc list

List all failover groups.

az sql instance-failover-group-arc list [--k8s-namespace]
                                        [--mi]
                                        [--resource-group]
                                        [--use-k8s]

Examples

List all failover groups in a namespace using the Kubernetes API.

az sql instance-failover-group-arc list --k8s-namespace arcdata --use-k8s

List all failover groups by querying Azure Resource Manager (ARM).

az sql instance-failover-group-arc list --mi sqlmi1 -g rg-name

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--k8s-namespace -k

Namespace where the failover groups are deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--mi

The name of the Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--resource-group -g

The Azure resource group of the Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--use-k8s

Use local Kubernetes APIs to perform this action.

Property Value
Parameter group: Kubernetes API – targeted Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az sql instance-failover-group-arc show

Show the details of a failover group resource.

az sql instance-failover-group-arc show --name
                                        [--k8s-namespace]
                                        [--mi]
                                        [--resource-group]
                                        [--use-k8s]

Examples

Show the details of a failover group using the Kubernetes API.

az sql instance-failover-group-arc show --name fogcr --use-k8s

Show the details of a failover group by querying Azure Resource Manager (ARM).

az sql instance-failover-group-arc show --name fogcr1 --mi sqlmi1 -g rg-name

Required Parameters

--name -n

The name of the failover group resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--k8s-namespace -k

Namespace where the failover group is deployed. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--mi

The name of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--resource-group -g

The Azure resource group of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--use-k8s

Use local Kubernetes APIs to perform this action.

Property Value
Parameter group: Kubernetes API – targeted Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az sql instance-failover-group-arc update

Update a failover group resource.

Update an Arc-enabled SQL Managed Instance failover group resource to change the role of the distributed availability group.

az sql instance-failover-group-arc update --name
                                          [--k8s-namespace]
                                          [--mi]
                                          [--no-wait]
                                          [--partner-sync-mode {async, sync}]
                                          [--resource-group]
                                          [--role {force-primary-allow-data-loss, force-secondary, secondary}]
                                          [--use-k8s]

Examples

Update a failover group resource to the secondary role from primary using the Kubernetes API.

az sql instance-failover-group-arc update --name fogcr --role secondary --use-k8s

Update a failover group resource using Azure Resource Manager.

az sql instance-failover-group-arc update --name fogcr  --role secondary --mi sqlmi1 --resource-group rg-name

Required Parameters

--name -n

The name of the failover group resource.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--k8s-namespace -k

Namespace where the failover group exists. If no namespace is specified, then the namespace defined in the kubeconfig will be used.

Property Value
Parameter group: Kubernetes API – targeted Arguments
--mi

The name of the Arc-enabled SQL managed instance to update.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--partner-sync-mode -m

The partner synchronization mode of the SQL managed instance.

Property Value
Accepted values: async, sync
--resource-group -g

The Azure resource group of the primary Arc-enabled SQL managed instance.

Property Value
Parameter group: Azure Resource Manager – targeted Arguments
--role

The requested role of the failover group.

Property Value
Accepted values: force-primary-allow-data-loss, force-secondary, secondary
--use-k8s

Use local Kubernetes APIs to perform this action.

Property Value
Parameter group: Kubernetes API – targeted Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False