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.

Create or Delete a Failover Group.

Commands

az sql instance-failover-group-arc create

Create a failover group resource.

az sql instance-failover-group-arc delete

Delete a failover group resource on a SQL managed instance.

az sql instance-failover-group-arc show

Show a failover group resource.

az sql instance-failover-group-arc update

Update a failover group resource.

az sql instance-failover-group-arc create

Create a failover group resource.

Create a failover group resource to create a distributed availability group.

az sql instance-failover-group-arc create --mi
                                          --name
                                          --partner-mi
                                          --partner-mirroring-cert-file
                                          --partner-mirroring-url
                                          --role
                                          [--k8s-namespace]
                                          [--partner-sync-mode]
                                          [--shared-name]
                                          [--use-k8s]

Examples

Ex 1 - Create a failover group resource fogCr1 to create failover group by using shared name sharedName1 between sqlmi instance sqlmi1 and partner SQL managed instance sqlmi2. It requires partner sqlmi primary mirror partnerPrimary:5022 and partner sqlmi mirror endpoint certificate file ./sqlmi2.cer.

az sql instance-failover-group-arc create --name fogCr1 --shared-name sharedName1 --mi sqlmi1 --role primary --partner-mi sqlmi2 --partner-mirroring-url partnerPrimary:5022 --partner-mirroring-cert-file ./sqlmi2.cer --use-k8s

Required Parameters

--mi

The name of the local 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.

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

--partner-mirroring-url -u

The mirroring endpoint URL of the partner SQL managed instance.

--role

The requested role of the failover group. Allowed values are: primary, secondary. Role can be changed.

Optional Parameters

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

--partner-sync-mode -m

The partner synchronization mode of managed SQL Instance.

--shared-name

The shared name of the failover group for this SQL managed instance. Both Managed Instance and its partner have to use the same shared name.

--use-k8s

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

az sql instance-failover-group-arc delete

Delete a failover group resource on a SQL managed instance.

Delete a failover group resource on a SQL managed instance.

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

Examples

Ex 1 - delete failover group resources named fogCr1.

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

Required Parameters

--name

The name of the failover group resource.

Optional Parameters

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

--use-k8s

Use local Kubernetes APIs to perform this action.

az sql instance-failover-group-arc show

Show a failover group resource.

Show a failover group resource.

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

Examples

Ex 1 - show failover group resources named fogCr1.

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

Required Parameters

--name

The name of the failover group resource.

Optional Parameters

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

--use-k8s

Use local Kubernetes APIs to perform this action.

az sql instance-failover-group-arc update

Update a failover group resource.

Update a failover group resource to change the role of distributed availability group.

az sql instance-failover-group-arc update --name
                                          [--k8s-namespace]
                                          [--partner-sync-mode]
                                          [--role]
                                          [--use-k8s]

Examples

Ex 1 - Update a failover group resource fogCr1 to secondary role from primary

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

Required Parameters

--name -n

The name of the failover group resource.

Optional Parameters

--k8s-namespace -k

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

--partner-sync-mode -m

The partner synchronization mode of managed SQL Instance.

--role

The requested role change of failover group resource. Role can only be changed to: secondary, force-primary-allow-data-loss, force-secondary.

--use-k8s

Use local Kubernetes APIs to perform this action.