az sql failover-group
Manage SQL Failover Groups.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql failover-group create |
Creates a failover group. |
Core | GA |
az sql failover-group delete |
Deletes a failover group. |
Core | GA |
az sql failover-group list |
Lists the failover groups in a server. |
Core | GA |
az sql failover-group set-primary |
Set the primary of the failover group by failing over all databases from the current primary server. |
Core | GA |
az sql failover-group show |
Gets a failover group. |
Core | GA |
az sql failover-group update |
Updates the failover group. |
Core | GA |
az sql failover-group create
Creates a failover group.
az sql failover-group create --name
--partner-server
--resource-group
--server
[--add-db]
[--failover-policy {Automatic, Manual}]
[--grace-period]
[--partner-resource-group]
Examples
Creates a failover group. (autogenerated)
az sql failover-group create --name MyFailoverGroup --partner-server newDb --resource-group MyResourceGroup --server myserver --subscription MySubscription
Required Parameters
The name of the Failover Group.
The name of the partner server of a Failover Group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Optional Parameters
List of databases to add to Failover Group.
The failover policy of the Failover Group.
Interval in hours before automatic failover is initiated if an outage occurs on the primary server. This indicates that Azure SQL Database will not initiate automatic failover before the grace period expires. Please note that failover operation with --allow-data-loss option might cause data loss due to the nature of asynchronous synchronization.
The name of the resource group of the partner server.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az sql failover-group delete
Deletes a failover group.
az sql failover-group delete --name
[--ids]
[--resource-group]
[--server]
[--subscription]
Required Parameters
The name of the Failover Group.
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az sql failover-group list
Lists the failover groups in a server.
az sql failover-group list [--ids]
[--resource-group]
[--server]
[--subscription]
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az sql failover-group set-primary
Set the primary of the failover group by failing over all databases from the current primary server.
az sql failover-group set-primary --name
[--allow-data-loss]
[--ids]
[--resource-group]
[--server]
[--subscription]
[--tpbff]
Examples
Set the primary of the failover group by failing over all databases from the current primary server. (autogenerated)
az sql failover-group set-primary --name MyFailoverGroup --resource-group MyResourceGroup --server myserver
Required Parameters
The name of the Failover Group.
Optional Parameters
Complete the failover even if doing so may result in data loss. This will allow the failover to proceed even if a primary database is unavailable.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Performs a planned failover as the first step, and if it fails for any reason, then initiates a forced failover with potential data loss. This will allow the failover to proceed even if a primary database is unavailable.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az sql failover-group show
Gets a failover group.
az sql failover-group show --name
[--ids]
[--resource-group]
[--server]
[--subscription]
Required Parameters
The name of the Failover Group.
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
az sql failover-group update
Updates the failover group.
az sql failover-group update --name
[--add]
[--add-db]
[--failover-policy {Automatic, Manual}]
[--force-string]
[--grace-period]
[--ids]
[--remove]
[--remove-db]
[--resource-group]
[--server]
[--set]
[--subscription]
Required Parameters
The name of the Failover Group.
Optional Parameters
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>
.
List of databases to add to Failover Group.
The failover policy of the Failover Group.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Interval in hours before automatic failover is initiated if an outage occurs on the primary server. This indicates that Azure SQL Database will not initiate automatic failover before the grace period expires. Please note that failover operation with --allow-data-loss option might cause data loss due to the nature of asynchronous synchronization.
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.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
List of databases to remove from Failover Group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.