Share via


az sql server-arc availability-group

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 server-arc availability-group command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage availability groups.

Commands

Name Description Type Status
az sql server-arc availability-group create

Create an availability group.

Extension Preview
az sql server-arc availability-group failover

Request manual failover of an availability group.

Extension Preview

az sql server-arc availability-group create

Preview

Command group 'sql server-arc availability-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create an availability group.

az sql server-arc availability-group create --mirroring-port
                                            --name
                                            --replica-ids
                                            --resource-group
                                            [--automated-backup-preference]
                                            [--availability-mode]
                                            [--certificate-name]
                                            [--cluster-type]
                                            [--databases]
                                            [--db-failover]
                                            [--dtc-support]
                                            [--endpoint-auth-mode]
                                            [--endpoint-login]
                                            [--failover-mode]
                                            [--failure-condition-level]
                                            [--health-check-timeout]
                                            [--listener-ipv4-addresses]
                                            [--listener-ipv4-masks]
                                            [--listener-ipv6-addresses]
                                            [--listener-name]
                                            [--listener-port]
                                            [--no-wait]
                                            [--required-synchronized-secondaries]
                                            [--seeding-mode]

Examples

Ex 1 - Create an availability group

az sql server-arc availability-group create --name myAvailabilityGroupName --resource-group myResourceGroup --replica-ids "/subscriptions/.../resourceGroups/.../providers/Microsoft.AzureArcData/sqlServerInstances/mySqlServerInstance" --mirroring-port 5022

Required Parameters

--mirroring-port

The port number for the database mirroring endpoint.

--name -n

Name of the availability group.

--replica-ids

One or more SQL Server Instance resource IDs (space-delimited). The first ID will be the initial primary replica.

--resource-group -g

Name of the resource group where the Arc-enabled SQL Server instance is located.

Optional Parameters

--automated-backup-preference

The automated backup preference for the availability group (PRIMARY | SECONDARY_ONLY | SECONDARY | NONE).

--availability-mode

The availability mode for the availability group (SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT).

--certificate-name

The name of the certificate for authenticating connections to the mirroring endpoint.

--cluster-type

The cluster type for the availability group (WSFC | NONE).

--databases

Database names (space-delimited).

--db-failover

Turns on database level failover for the availability group (ON | OFF).

--dtc-support

Turns on support for cross-database transactions through the distributed transaction coordinator for the availability group (PER_DB | OFF).

--endpoint-auth-mode

The authentication mode for connecting to the mirroring endpoint.

--endpoint-login

The login to grant connect permissions on the mirroring endpoint.

--failover-mode

The failover mode for the availability group (AUTOMATIC | MANUAL | EXTERNAL).

--failure-condition-level

The failure condition level for the availability group (1 | 2 | 3 | 4 | 5).

--health-check-timeout

The health check timeout (in milliseconds) for the availability group. The minimum value is 15000.

--listener-ipv4-addresses

One or more IPv4 addresses (space-delimited) for the availability group listener.

--listener-ipv4-masks

One or more subnet masks for the IPv4 addresses of the availability group listener. Must match the order and number of IPv4 addresses.

--listener-ipv6-addresses

One or more IPv6 addresses (space-delimited) for the availability group listener.

--listener-name

The name of the availability group listener.

--listener-port

The port number for the availability group listener.

--no-wait

If given, the command will return once the create request has been submitted. It will not wait until the availability group has been created.

Default value: False
--required-synchronized-secondaries

Specifies the minimum number of synchronous secondaries required to commit before the primary commits a transaction (min 0 max num replicas - 1).

--seeding-mode

The seeding mode for the availability group (AUTOMATIC | MANUAL).

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 server-arc availability-group failover

Preview

Command group 'sql server-arc availability-group' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Request manual failover of an availability group.

az sql server-arc availability-group failover --name
                                              --resource-group
                                              --server-name

Examples

Ex 1 - Request manual failover of an availability group

az sql server-arc availability-group failover --name myAvailabilityGroupName --resource-group myResourceGroup --server-name myServerName

Required Parameters

--name -n

Name of the availability group.

--resource-group -g

Name of the resource group where the Arc-enabled SQL Server instance is located.

--server-name

Name of the failover target Arc-enabled SQL Server.

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.