az sql instance-failover-group

管理 SQL 實例故障轉移群組。

命令

名稱 Description 類型 狀態
az sql instance-failover-group create

建立兩個連線受控實例之間的實例故障轉移群組。

核心 GA
az sql instance-failover-group delete

刪除故障轉移群組。

核心 GA
az sql instance-failover-group set-primary

從目前主要受控實例故障轉移所有資料庫,以設定實例故障轉移群組的主要複本。

核心 GA
az sql instance-failover-group show

取得故障轉移群組。

核心 GA
az sql instance-failover-group update

更新 實例故障轉移群組。

核心 GA

az sql instance-failover-group create

建立兩個連線受控實例之間的實例故障轉移群組。

如果主伺服器上發生中斷,寬限期表示 Azure SQL 受控資料庫不會在寬限期到期之前起始自動故障轉移。 請注意,使用 --allow-data-loss 選項的故障轉移作業可能會導致數據遺失,因為異步同步處理的性質。

az sql instance-failover-group create --mi
                                      --name
                                      --partner-mi
                                      --partner-resource-group
                                      --resource-group
                                      [--failover-policy {Automatic, Manual}]
                                      [--grace-period]
                                      [--secondary-type]

必要參數

--mi --source-mi

Azure SQL 受控執行個體 的名稱。

--name -n

實例故障轉移群組的名稱。

--partner-mi

實例故障轉移群組之夥伴受控實例的名稱。

--partner-resource-group

夥伴受控實例的資源群組名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--failover-policy

實例故障轉移群組的故障轉移原則。

接受的值: Automatic, Manual
預設值: Automatic
--grace-period

如果在主伺服器上發生中斷,則起始自動故障轉移之前的小時間隔。 這表示 Azure SQL 資料庫 不會在寬限期到期之前起始自動故障轉移。 請注意,使用 --allow-data-loss 選項的故障轉移作業可能會導致數據遺失,因為異步同步處理的性質。

預設值: 1
--secondary-type

故障轉移群組中次要實例的預期用法。 待命表示次要實例將作為被動復本,僅供災害復原使用。

預設值: Geo
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sql instance-failover-group delete

刪除故障轉移群組。

az sql instance-failover-group delete --location
                                      --name
                                      --resource-group

必要參數

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--name -n

實例故障轉移群組的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sql instance-failover-group set-primary

從目前主要受控實例故障轉移所有資料庫,以設定實例故障轉移群組的主要複本。

az sql instance-failover-group set-primary --location
                                           --name
                                           --resource-group
                                           [--allow-data-loss]

必要參數

--location -l

實例故障轉移群組中次要實例的位置。 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--name -n

實例故障轉移群組的名稱。

--resource-group -g

實例故障轉移群組中次要實例的資源群組名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--allow-data-loss

即使這樣做可能會導致數據遺失,也請完成故障轉移。 這可讓故障轉移繼續,即使主資料庫無法使用也一樣。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sql instance-failover-group show

取得故障轉移群組。

az sql instance-failover-group show --location
                                    --name
                                    --resource-group

必要參數

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--name -n

實例故障轉移群組的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sql instance-failover-group update

更新 實例故障轉移群組。

az sql instance-failover-group update --location
                                      --name
                                      --resource-group
                                      [--add]
                                      [--failover-policy {Automatic, Manual}]
                                      [--force-string]
                                      [--grace-period]
                                      [--remove]
                                      [--secondary-type]
                                      [--set]

必要參數

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--name -n

實例故障轉移群組的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--failover-policy

實例故障轉移群組的故障轉移原則。

接受的值: Automatic, Manual
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--grace-period

如果在主伺服器上發生中斷,則起始自動故障轉移之前的小時間隔。 這表示 Azure SQL 資料庫 不會在寬限期到期之前起始自動故障轉移。 請注意,使用 --allow-data-loss 選項的故障轉移作業可能會導致數據遺失,因為異步同步處理的性質。

--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--secondary-type

故障轉移群組中次要實例的預期用法。 待命表示次要實例將作為被動復本,僅供災害復原使用。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。