az sql failover-group
管理 SQL 故障轉移群組。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
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]
[--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 的名稱。 您可以使用 來設定預設值 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 Database 不會在寬限期到期之前起始自動故障轉移。 請注意,使用 --allow-data-loss 選項的故障轉移作業可能會導致數據遺失,因為異步同步處理的性質。
屬性 | 值 |
---|---|
預設值: | 1 |
夥伴伺服器的資源群組名稱。
夥伴伺服器上的資料庫次要類型。
屬性 | 值 |
---|---|
接受的值: | Geo, Standby |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 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.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Azure SQL Server 的名稱。 您可以使用 來設定預設值 az configure --defaults sql-server=<name>
。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | 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.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Azure SQL Server 的名稱。 您可以使用 來設定預設值 az configure --defaults sql-server=<name>
。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | 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 |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Azure SQL Server 的名稱。 您可以使用 來設定預設值 az configure --defaults sql-server=<name>
。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
執行計劃性故障轉移作為第一個步驟,如果因為任何原因而失敗,則會起始可能遺失數據的強制故障轉移。 這可讓故障轉移繼續,即使主資料庫無法使用也一樣。
屬性 | 值 |
---|---|
預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | 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.
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
Azure SQL Server 的名稱。 您可以使用 來設定預設值 az configure --defaults sql-server=<name>
。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | 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]
[--remove]
[--remove-db]
[--resource-group]
[--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 Database 不會在寬限期到期之前起始自動故障轉移。 請注意,使用 --allow-data-loss 選項的故障轉移作業可能會導致數據遺失,因為異步同步處理的性質。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>
或 --remove propertyToRemove
。
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
預設值: | [] |
要從故障轉移群組移除的資料庫清單。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
夥伴伺服器上的資料庫次要類型。
屬性 | 值 |
---|---|
接受的值: | Geo, Standby |
Azure SQL Server 的名稱。 您可以使用 來設定預設值 az configure --defaults sql-server=<name>
。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
指定要設定的屬性路徑和值,以更新物件。 範例: --set property1.property2=<value>
.
屬性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
預設值: | [] |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
屬性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |