az sql failover-group
管理 SQL 故障转移组。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az sql failover-group create |
创建故障转移组。 |
Core | GA |
| az sql failover-group delete |
删除故障转移组。 |
Core | GA |
| az sql failover-group list |
列出服务器中的故障转移组。 |
Core | GA |
| az sql failover-group set-primary |
通过从当前主服务器故障转移所有数据库来设置故障转移组的主数据库。 |
Core | GA |
| az sql failover-group show |
获取故障转移组。 |
Core | GA |
| az sql failover-group update |
更新故障转移组。 |
Core | GA |
az sql failover-group create
创建故障转移组。
az sql failover-group create --name
--partner-server
--resource-group
--server
[--add-db]
[--failover-policy {Automatic, Manual}]
[--grace-period]
[--partner-resource-group]
[--partner-server-ids]
[--ro-endpoint-target]
[--ro-failover-policy {Disabled, Enabled}]
[--secondary-type {Geo, Standby}]
示例
创建故障转移组。 (autogenerated)
az sql failover-group create --name MyFailoverGroup --partner-server newDb --resource-group MyResourceGroup --server myserver --subscription MySubscription
必需参数
故障转移组的名称。
故障转移组的伙伴服务器的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
要添加到故障转移组的数据库列表。
故障转移组的故障转移策略。
| 属性 | 值 |
|---|---|
| 默认值: | Manual |
| 接受的值: | Automatic, Manual |
如果在主服务器上发生中断,则启动自动故障转移之前的时间间隔(以小时为单位)。 这表示 Azure SQL 数据库在宽限期到期之前不会启动自动故障转移。 请注意,使用 --allow-data-loss 选项的故障转移操作可能会导致数据丢失,因为异步同步的性质。
| 属性 | 值 |
|---|---|
| 默认值: | 1 |
合作伙伴服务器的资源组的名称。
合作伙伴服务器资源 ID 的故障转移组列表。
只读终结点目标服务器的资源 ID。
故障转移组的只读终结点的策略。
| 属性 | 值 |
|---|---|
| 默认值: | Disabled |
| 接受的值: | Disabled, Enabled |
合作伙伴服务器上的数据库辅助类型。
| 属性 | 值 |
|---|---|
| 接受的值: | Geo, Standby |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql failover-group delete
删除故障转移组。
az sql failover-group delete --name
[--ids]
[--resource-group]
[--server]
[--subscription]
必需参数
故障转移组的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql failover-group list
列出服务器中的故障转移组。
az sql failover-group list [--ids]
[--resource-group]
[--server]
[--subscription]
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql failover-group set-primary
通过从当前主服务器故障转移所有数据库来设置故障转移组的主数据库。
az sql failover-group set-primary --name
[--allow-data-loss]
[--ids]
[--resource-group]
[--server]
[--subscription]
[--tpbff --try-planned-before-forced-failover]
示例
通过从当前主服务器故障转移所有数据库来设置故障转移组的主数据库。 (autogenerated)
az sql failover-group set-primary --name MyFailoverGroup --resource-group MyResourceGroup --server myserver
必需参数
故障转移组的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
完成故障转移,即使这样做可能会导致数据丢失。 这样,即使主数据库不可用,故障转移也会继续。
| 属性 | 值 |
|---|---|
| 默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
执行计划内故障转移作为第一步,如果出于任何原因而失败,则启动具有潜在数据丢失的强制故障转移。 这样,即使主数据库不可用,故障转移也会继续。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql failover-group show
获取故障转移组。
az sql failover-group show --name
[--ids]
[--resource-group]
[--server]
[--subscription]
必需参数
故障转移组的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az sql failover-group update
更新故障转移组。
az sql failover-group update --name
[--add]
[--add-db]
[--failover-policy {Automatic, Manual}]
[--force-string]
[--grace-period]
[--ids]
[--partner-server-ids]
[--remove]
[--remove-db]
[--resource-group]
[--ro-endpoint-target]
[--ro-failover-policy {Disabled, Enabled}]
[--secondary-type {Geo, Standby}]
[--server]
[--set]
[--subscription]
必需参数
故障转移组的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
要添加到故障转移组的数据库列表。
故障转移组的故障转移策略。
| 属性 | 值 |
|---|---|
| 接受的值: | Automatic, Manual |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | False |
如果在主服务器上发生中断,则启动自动故障转移之前的时间间隔(以小时为单位)。 这表示 Azure SQL 数据库在宽限期到期之前不会启动自动故障转移。 请注意,使用 --allow-data-loss 选项的故障转移操作可能会导致数据丢失,因为异步同步的性质。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
合作伙伴服务器资源 ID 的故障转移组列表。
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
要从故障转移组中删除的数据库列表。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
只读终结点目标服务器的资源 ID。
故障转移组的只读终结点的策略。
| 属性 | 值 |
|---|---|
| 接受的值: | Disabled, Enabled |
合作伙伴服务器上的数据库辅助类型。
| 属性 | 值 |
|---|---|
| 接受的值: | Geo, Standby |
Azure SQL Server 的名称。 可以使用 < a0/a0> 配置默认值 az configure --defaults sql-server=<name>。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>。
| 属性 | 值 |
|---|---|
| Parameter group: | Generic Update Arguments |
| 默认值: | [] |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |