[AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 3

cow977發表於2019-08-26

2 、故障轉移的概述

2 、Overview of Failover

下表概述了在不同的可用性和故障轉移模式下支援的故障轉移形式。對於每個對,有效的可用性模式和故障轉移模式由主副本的模式和一個或多個輔助副本的模式的交集決定。

The following table summarizes which forms of failover are supported   under different availability and failover modes. For each pairing, the   effective availability mode and failover mode is determined by the   intersection of the modes of the primary replica plus the modes of one or   more secondary replicas.


非同步提交模式

同步提交模式(手動故障轉移模式)

同步提交模式(自動故障轉移模式)

自動故障轉移

計劃的手動故障轉移

強制故障轉移

是*


Asynchronous-commit mode

Synchronous-commit mode with      manual-failover mode

Synchronous-commit mode with      automatic-failover mode

Automatic failover

No

No

Yes

Planned manual failover

No

Yes

Yes

Forced failover

Yes

Yes

Yes *

* 如果對已同步的次要副本發出強制故障轉移命令,次要副本的行為與手動故障轉移時的行為相同。

* If you   issue a forced failover command on a synchronized secondary replica, the   secondary replica behaves the same as for a manual failover.

在故障轉移過程中,資料庫不可用的時間取決於故障轉移的型別及其原因。

The amount of time that the database is unavailable during a failover   depends on the type of failover and its cause.

重要

Important

為了支援在故障轉移後進行客戶端連線,除包含的資料庫外,必須在新的主資料庫上手動重新建立在任何先前主資料庫上定義的登入名和作業。有關詳細資訊,請參閱 管理可用性組中資料庫的登入名和作業(SQL Server)

To support client connections after failover, except for contained   databases, logins and jobs defined on any of the former primary databases   must be manually recreated on the new primary database. For more information,   see Management of   Logins and Jobs for the Databases of an Availability Group(SQL Server).

故障轉移集

Failover Sets

就故障轉移集而言,可理解為某一給定可用性組的可能的各種故障轉移形式。一個故障轉移集由主副本和支援某一給定故障轉移形式的輔助副本構成,如下所示:

The forms of failover that are possible for a given availability group   can be understood in terms of failover sets. A failover set consists of the   primary replica and secondary replicas that support a given form of failover,   as follows:

·        自動故障轉移集(可選): 在給定的可用性組中,僅當一對可用性副本(包括當前主副本)配置為使用同步提交模式以及自動故障轉移(如果有)時,才發生這種故障轉移。僅當輔助副本當前已與主副本同步時,自動故障轉移集才會生效。

·        Automatic failover set (optional): Within a given availability group, a pair   of availability replicas (including the current primary replica) that are   configured for synchronous-commit mode with automatic failover, if any. An   automatic failover set takes effect only if the secondary replica is   currently SYNCHRONIZED with the primary replica.

·        同步提交故障轉移集(可選): 在給定的可用性組中,僅當一組(兩個或三個)可用性副本(包括當前主副本)配置為使用同步提交模式(如果有)時,才發生這種故障轉移。僅當輔助副本配置為使用手動故障轉移模式,並且至少一個輔助副本當前已與主副本同步時,同步提交故障轉移集才會生效。

·        Synchronous-commit failover set (optional): Within a given availability group, a set of   two or three availability replicas (including the current primary replica)   that are configured for synchronous-commit mode, if any. A synchronous-commit   failover set takes effect only if the secondary replicas are configured for   manual failover mode and at least one secondary replica is currently   SYNCHRONIZED with the primary replica.

·        整個故障轉移集: 在給定的可用性組內,其執行狀態當前為聯機的所有可用性副本的集合,而不考慮可用性模式和故障轉移模式。僅噹噹前沒有輔助副本已與主副本同步時,整個故障轉移集才會變為相關的。

·        Entire failover set : Within a given availability group, the set of all availability replicas   whose operational state is currently ONLINE, regardless of availability mode   and of failover mode. The entire failover set becomes relevant when no   secondary replica is currently SYNCHRONIZED with the primary replica.

當您將可用性副本配置為同步提交以及自動故障轉移時,此可用性副本將成為自動故障轉移集的一部分。但是,該集是否生效則取決於當前主副本。在某一給定時間實際可用的故障轉移形式取決於當前有效的故障轉移集。

When you configure an availability replica as synchronous commit with   automatic failover, the availability replica becomes part of the automatic   failover set. However whether the set takes effect depends the current   primary. The forms of failover that are actually possible at a given time   depends on what failover sets are currently in effect.

例如,考慮一個可用性組,它有四個可用性副本,如下所示:

For example, consider an availability group that has four availability   replicas, as follows:

副本

可用性模式和故障轉移模式設定

僅當輔助副本配置為使用手動故障轉移模式,並且至少一個輔助副本當前與主要副本同步時,A

同步提交模式(自動故障轉移)

B

同步提交模式(自動故障轉移)

C

同步提交模式(僅限計劃的手動故障轉移)

D

非同步提交模式(僅限強制故障轉移)

Replica

Availability Mode and Failover Mode      Settings

僅當輔助副本配置為使用手動故障轉移模式,並且至少一個輔助副本當前與主要副本同步時,A

Synchronous commit with automatic failover

B

Synchronous commit with automatic failover

C

Synchronous commit with planned manual     failover only

D

Asynchronous commit (with only forced     failover)

每個輔助副本的故障轉移行為取決於哪個可用性副本當前是主副本。基本上,對於給定的輔助副本而言,針對當前主副本的故障轉移行為是最壞的情況。下圖說明輔助副本的故障轉移行為如何隨當前主副本而變化,以及該行為是配置為非同步提交模式(僅限強制故障轉移)還是同步提交模式(具有或沒有自動故障轉移)。

The failover behavior for each secondary replica depends on which availability   replica is currently the primary replica. Basically, for a given secondary   replica, the failover behavior is the worst case given the current primary   replica. The following figure illustrates how the failover behavior of   secondary replicas varies depending on the current primary replica, and   whether it is configured for asynchronous-commit mode (with only forced   failover) or synchronous-commit mode (with or without automatic failover).

[AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 3


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-2654913/,如需轉載,請註明出處,否則將追究法律責任。

相關文章