Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az sql vm group

Manage SQL virtual machine groups.

Commands

Name Description Type Status
az sql vm group ag-listener

Manage SQL availability group listeners.

Core GA
az sql vm group ag-listener create

Creates an availability group listener.

Core GA
az sql vm group ag-listener delete

Deletes an availability group listener.

Core GA
az sql vm group ag-listener list

Lists all availability group listeners in a SQL virtual machine group.

Core GA
az sql vm group ag-listener show

Gets an availability group listener.

Core GA
az sql vm group ag-listener update

Updates an availability group listener.

Core GA
az sql vm group create

Creates a SQL virtual machine group.

Core GA
az sql vm group delete

Deletes a SQL virtual machine group.

Core GA
az sql vm group list

Lists all SQL virtual machine groups in a resource group or subscription.

Core GA
az sql vm group show

Gets a SQL virtual machine group.

Core GA
az sql vm group update

Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group.

Core GA

az sql vm group create

Creates a SQL virtual machine group.

az sql vm group create --domain-fqdn
 --image-offer
 --image-sku {Developer, Enterprise}
 --name
 --operator-acc
 --resource-group
 --service-acc
 --storage-account
 [--acquire-policy-token]
 [--bootstrap-acc]
 [--change-reference]
 [--cluster-subnet-type {MultiSubnet, SingleSubnet}]
 [--fsw-path]
 [--location]
 [--ou-path]
 [--sa-key]
 [--tags]

Examples

Create a SQL virtual machine group for SQL2016-WS2016 Enterprise virtual machines.

az sql vm group create -n sqlvmgroup -l eastus -g myresourcegroup --image-offer SQL2016-WS2016 --image-sku Enterprise --domain-fqdn Domain.com --operator-acc testop --service-acc testservice --sa-key {PublicKey} --storage-account 'https://storacc.blob.core.windows.net/'

Create a SQL virtual machine group for SQL2019-WS2022 Enterprise virtual machines with MultiSubnet.

az sql vm group create -n sqlvmgroup -l eastus -g myresourcegroup --image-offer SQL2019-WS2022 --image-sku Enterprise --cluster-subnet-type MultiSubnet --domain-fqdn Domain.com --operator-acc testop --service-acc testservice --sa-key {PublicKey} --storage-account 'https://storacc.blob.core.windows.net/'

Required Parameters

--domain-fqdn -f

Fully qualified name of the domain.

Property Value
Parameter group: WSFC Domain Profile Arguments
--image-offer -i

SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.

Property Value
Parameter group: SQL Server License Arguments
--image-sku -s

SQL image sku.

Property Value
Parameter group: SQL Server License Arguments
Accepted values: Developer, Enterprise
--name -n

Name of the SQL virtual machine group.

--operator-acc -p

Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.

Property Value
Parameter group: WSFC Domain Profile Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-acc -e

Account name under which SQL service will run on all participating SQL virtual machines in the cluster.

Property Value
Parameter group: WSFC Domain Profile Arguments
--storage-account -u

Storage account url of the witness storage account.

Property Value
Parameter group: WSFC Domain Profile Arguments

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--bootstrap-acc

Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).

Property Value
Parameter group: WSFC Domain Profile Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--cluster-subnet-type

Cluster subnet type.

Property Value
Parameter group: WSFC Domain Profile Arguments
Default value: SingleSubnet
Accepted values: MultiSubnet, SingleSubnet
--fsw-path

Optional path for fileshare witness.

Property Value
Parameter group: WSFC Domain Profile Arguments
--location -l

Location. If not provided, group will be created in the same reosurce group location.You can configure the default location using az configure --defaults location=<location>.

--ou-path

Organizational Unit path in which the nodes and cluster will be present. Example: OU=WSCluster,DC=testdomain,DC=com.

Property Value
Parameter group: WSFC Domain Profile Arguments
--sa-key -k

Primary key of the witness storage account.

Property Value
Parameter group: WSFC Domain Profile Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

az sql vm group delete

Deletes a SQL virtual machine group.

az sql vm group delete [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]
 [--yes]

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the SQL virtual machine group.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

az sql vm group list

Lists all SQL virtual machine groups in a resource group or subscription.

az sql vm group list [--resource-group]

Optional Parameters

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

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az sql vm group show

Gets a SQL virtual machine group.

az sql vm group show [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Optional Parameters

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

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the SQL virtual machine group.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az sql vm group update

Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group.

az sql vm group update [--acquire-policy-token]
 [--add]
 [--bootstrap-acc]
 [--change-reference]
 [--cluster-subnet-type {MultiSubnet, SingleSubnet}]
 [--domain-fqdn]
 [--force-string]
 [--fsw-path]
 [--ids]
 [--name]
 [--operator-acc]
 [--ou-path]
 [--remove]
 [--resource-group]
 [--sa-key]
 [--service-acc]
 [--set]
 [--storage-account]
 [--subscription]
 [--tags]

Examples

Update an empty SQL virtual machine group operator account.

az sql vm group update -n sqlvmgroup -g myresourcegroup --operator-acc testop

Update an empty SQL virtual machine group storage account and key.

az sql vm group update -n sqlvmgroup -g myresourcegroup --sa-key {PublicKey} --storage-account 'https://newstoracc.blob.core.windows.net/'

Optional Parameters

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

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--bootstrap-acc

Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).

Property Value
Parameter group: WSFC Domain Profile Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--cluster-subnet-type

Cluster subnet type.

Property Value
Parameter group: WSFC Domain Profile Arguments
Accepted values: MultiSubnet, SingleSubnet
--domain-fqdn -f

Fully qualified name of the domain.

Property Value
Parameter group: WSFC Domain Profile Arguments
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--fsw-path

Optional path for fileshare witness.

Property Value
Parameter group: WSFC Domain Profile Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the SQL virtual machine group.

Property Value
Parameter group: Resource Id Arguments
--operator-acc -p

Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.

Property Value
Parameter group: WSFC Domain Profile Arguments
--ou-path

Organizational Unit path in which the nodes and cluster will be present. Example: OU=WSCluster,DC=testdomain,DC=com.

Property Value
Parameter group: WSFC Domain Profile Arguments
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--sa-key -k

Primary key of the witness storage account.

Property Value
Parameter group: WSFC Domain Profile Arguments
--service-acc -e

Account name under which SQL service will run on all participating SQL virtual machines in the cluster.

Property Value
Parameter group: WSFC Domain Profile Arguments
--set

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

Property Value
Parameter group: Generic Update Arguments
Default value: []
--storage-account -u

Storage account url of the witness storage account.

Property Value
Parameter group: WSFC Domain Profile Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.


Feedback

Was this page helpful?