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
The name of the primary SQL managed instance.
The name of the failover group resource.
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.
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 |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
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 |
The mirroring endpoint URL of the partner SQL managed instance.
The Azure resource group of the DR partner Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The partner synchronization mode of the Arc-enabled SQL managed instance.
Property | Value |
---|---|
Accepted values: | async, sync |
The mirroring endpoint URL of the primary SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The Azure resource group of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The requested role of the failover group. The role can be changed.
Property | Value |
---|---|
Accepted values: | primary, secondary |
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 |
Create the Arc-enabled SQL managed instance failover group using local Kubernetes APIs.
Property | Value |
---|---|
Parameter group: | Kubernetes API – targeted Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
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 |
The name of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The Azure resource group of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
Use local Kubernetes APIs to perform this action.
Property | Value |
---|---|
Parameter group: | Kubernetes API – targeted Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
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 |
The name of the Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The Azure resource group of the Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
Use local Kubernetes APIs to perform this action.
Property | Value |
---|---|
Parameter group: | Kubernetes API – targeted Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
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 |
The name of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The Azure resource group of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
Use local Kubernetes APIs to perform this action.
Property | Value |
---|---|
Parameter group: | Kubernetes API – targeted Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
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.
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 |
The name of the Arc-enabled SQL managed instance to update.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Default value: | False |
The partner synchronization mode of the SQL managed instance.
Property | Value |
---|---|
Accepted values: | async, sync |
The Azure resource group of the primary Arc-enabled SQL managed instance.
Property | Value |
---|---|
Parameter group: | Azure Resource Manager – targeted Arguments |
The requested role of the failover group.
Property | Value |
---|---|
Accepted values: | force-primary-allow-data-loss, force-secondary, secondary |
Use local Kubernetes APIs to perform this action.
Property | Value |
---|---|
Parameter group: | Kubernetes API – targeted Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |