暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

快速启动ORACLE故障转移配置

原创 CiciLee 2022-08-27
582

在今天的文章中,我们将研究快速启动故障转移配置。

Fast-Start Failover 的配置概括起来包括以下 8 个步骤。

A. 识别快速启动故障转移备用数据库

B. 设置数据保护模式

C. 设置将发生快速启动故障转移的阈值

C’.设置其他快速启动故障转移功能

D. 设置我们希望发生的附加条件

E. 激活快速启动故障转移

F.起始观察者

G. 验证配置

现在让我们看看这些操作是如何完成的。

除非单独指定,否则从 DGMGRL 运行的命令将从 Primary-1 运行。

A. 识别快速启动故障转移备用数据库

快速启动故障转移配置的第一步是确定目标备用数据库。

1.我们查询Fast-start Failover配置的当前状态。

DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制

2.我们对Fast-start Failover配置进行了详细的质疑。

DGMGRL> show fast_start failover

Fast-Start Failover: DISABLED

  Threshold:          30 seconds
  Target:             (none)
  Observer:           (none)
  Lag Limit:          30 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: (none)
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)
复制

3.快速启动故障转移目标备用数据库已确定。

DGMGRL> edit database primary set property FastStartFailoverTarget=standby;
Property "faststartfailovertarget" updated
复制

4.我们再次查询快速启动故障转移配置。

DGMGRL> show fast_start failover

Fast-Start Failover: DISABLED

  Threshold:          30 seconds
  Target:             (none)
  Observer:           (none)
  Lag Limit:          30 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: (none)
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)
复制

配置没有变化。必须启用快速启动故障转移才能出现,或者我们可以在如下查询时看到它。

DGMGRL> show database primary FastStartFailoverTarget;
  FastStartFailoverTarget = 'standby'
DGMGRL> show database standby FastStartFailoverTarget;
  FastStartFailoverTarget = ''
复制

B. 设置数据保护模式

要启用快速启动故障转移,数据保护模式必须处于最高可用性或最高性能模式。

选择正确的保护模式很重要,因为它直接影响发生灾难时的数据丢失。

如果决定使用最高性能模式,则必须设置 FastStartFailoverLagLimit 参数。

该参数决定了在达到最大延迟秒数时将激活快速启动故障转移。

1.我们检查当前的数据保护模式。

DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制
  1. 我们质疑重做运输模组。
DGMGRL> show database primary 'LogXptMode';
  LogXptMode = 'ASYNC'
DGMGRL> show database standby 'LogXptMode';
  LogXptMode = 'ASYNC'
DGMGRL> Show database logical 'LogXptMode';
  LogXptMode = 'ASYNC'
复制
  1. 如果我想重做同步到快速启动故障转移备用数据库,我按照这些步骤。
Database, I follow these steps.
DGMGRL> edit database primary set property 'LogXptMode'=SYNC;
Property "LogXptMode" updated
DGMGRL> edit database standby set property LogXptMode=SYNC;
Property "logxptmode" updated
DGMGRL> edit configuration set protection mode as MaxAvailability;
Succeeded.
复制
DGMGRL> show configuration 

Configuration - Broker_Configuration

  Protection Mode: MaxAvailability
  Databases:
    primary - Primary database
      Warning: ORA-16629: database reports a different protection level from the protection mode

    standby - Physical standby database
    logical - Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:
WARNING
复制

出现此错误的原因是因为我在为主数据库设置 LogXptMode 时没有使用正确的语法。

语法被更正并再次查询。

ntax is corrected and queried again.
DGMGRL> edit database primary set property LogXptMode=SYNC;
Property "logxptmode" updated
DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxAvailability
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制
  1. 看如何在使用Maximum Performance模式时设置FastStartFailoverLagLimit参数,我再次更改Protection Mode并设置参数。

此参数的默认值为 30 秒。

DGMGRL> show configuration verbose

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '30'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制
DGMGRL> edit database primary set property LogXptMode=ASYNC;
Error: ORA-16802: downgrading redo transport mode from SYNC disallowed

Failed.
复制

出现此错误的原因是需要先更改保护模式。

DGMGRL> edit configuration set protection mode as MaxPerformance;
Succeeded.
DGMGRL> edit database primary set property LogXptMode=ASYNC;
Property "logxptmode" updated
DGMGRL> edit database standby set property LogXptMode=ASYNC;
Property "logxptmode" updated
DGMGRL> edit database logical set property LogXptMode=ASYNC;
Property "logxptmode" updated
复制
DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制
DGMGRL> show database primary LogXptMode;               
  LogXptMode = 'async'
DGMGRL> show database standby LogXptMode;
  LogXptMode = 'async'
DGMGRL> show database logical LogXptMode;
  LogXptMode = 'async'
复制
DGMGRL> edit configuration set property FastStartFailoverLagLimit=900;
Property "faststartfailoverlaglimit" updated
DGMGRL> show configuration verbose

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '900'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制

C. 设置将发生快速启动故障转移的阈值

快速启动故障转移备用数据库以及观察者未收到主数据库响应的时间长短,决定了如何触发快速启动故障转移。

这是通过 FastStartFailoverThreshold 参数完成的。

必须非常准确地设置此参数以防止不必要的故障转移。

例如,如果我们的网络连接持续中断几秒钟,则将此参数值设置为低将弊大于利。

Oracle 推荐了设置此参数的最佳值。

对于具有单实例主节点且几乎没有网络延迟的系统:10-15 秒

对于具有单实例主节点的网络延迟系统:30-45 秒

对于使用 RAC Primary 的构建:CSS Miss Count + Reconfiguration Time + 24-40 seconds。

CSS Miss Count 如下所示。

[grid@primary1 ~]$ cd $GRID_HOME
[grid@primary1 grid]$ crsctl get css misscount;
CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.
复制

1.根据上面的信息,我把这个值设置为100,因为我使用RAC结构和CSS MissCount值是30秒。

DGMGRL> show configuration verbose

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database

  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '900'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS
复制
DGMGRL> edit configuration set property FastStartFailoverThreshold=100;
Property "faststartfailoverthreshold" updated
复制
DGMGRL> show configuration FastStartFailoverThreshold
  FastStartFailoverThreshold = '100'
复制

C’.设置其他快速启动故障转移功能

为了最准确地使用快速启动故障转移,我需要设置许多附加参数。
一个。 FastStartFailoverLagLimit

我们已经给出了保护模式的信息,但是这个参数的使用有一些限制。

有意识的使用是必不可少的,因为它是直接影响数据丢失的参数。

可以在最高性能模式下进行设置。

最大可用性在此模式下无效,因为 SYNC 已在运行。

必须在备用端启用实时应用。

默认值为 30,最小值为 10。

DGMGRL> edit configuration set property FastStartFailoverLagLimit=900;
Property "faststartfailoverlaglimit" updated
DGMGRL> show configuration verbose
 
Configuration - Broker_Configuration
 
  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - Physical standby database
    logical - Logical standby database
 
  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '900'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS
复制

b.FastStartFailoverPmyShutdown

它通过断开主数据库与观察者和目标备用数据库的连接来确定在发生故障转移后是否关闭主数据库。

默认值为 TRUE,即关闭。

TRUE:在 FastStartFailoverThreshold 值之后发生故障转移后,主数据库通过 Shutdown Abort 关闭。

FALSE:未关闭主数据库以查看导致故障转移的原因。

此信息可从 V$FS_FAILOVER_STATS 视图中看到。

如果我不想让它关闭。

DGMGRL> edit configuration set property FastStartFailoverPmyShutdown=FALSE;
Property "faststartfailoverpmyshutdown" updated
DGMGRL> show configuration FastStartFailoverPmyShutdown 
  FastStartFailoverPmyShutdown = 'FALSE'
复制

我将其设置回 TRUE 因为我希望将其关闭。

DGMGRL> edit configuration set property FastStartFailoverPmyShutdown=TRUE ;
Property "faststartfailoverpmyshutdown" updated
DGMGRL> show configuration FastStartFailoverPmyShutdown
  FastStartFailoverPmyShutdown = 'TRUE'
复制

如果用户配置或具有 SYSDBA 授权的应用程序使用 DBMS_DG.INITIATE_FS_FAILOVER 函数调用故障转移,即使此参数设置为 FALSE,主数据库也会关闭。

c.FastStartFailoverAutoReinstate

它指定在故障转移后将不再工作的主数据库是否将自动成为物理备用数据库。

我们将此过程称为 REINSTATE。 其默认值为 TRUE。 这个过程有一些先决条件。

FastStartFailoverAutoReinstate 参数为 TRUE。

在故障转移之前和原主数据库重启后,原主数据库和新主数据库必须具有相同的快速启动故障转移配置。

将执行 REINSTATE 和新主数据库的观察者必须能够连接到原始主数据库。

如果未请求自动 REINSTATE:

DGMGRL> edit configuration set property FastStartFailoverAutoReinstate=FALSE;
Property "faststartfailoverautoreinstate" updated
DGMGRL> show configuration FastStartFailoverAutoReinstate
  FastStartFailoverAutoReinstate = 'FALSE'
复制

我想再次自动恢复我将参数设置为 TRUE。

DGMGRL> edit configuration set property FastStartFailoverAutoReinstate=TRUE;
Property "faststartfailoverautoreinstate" updated
DGMGRL> show configuration FastStartFailoverAutoReinstate
  FastStartFailoverAutoReinstate = 'TRUE'
复制

c’.观察者连接标识符

它是决定 Observer 如何连接到主数据库和备用数据库的参数。

默认情况下,此值采用“DGConnectIdentifier”参数。 如果不使用不同的值,则无需设置它。

我们设置如下。

1.我们查询参数的当前值。

DGMGRL> show database primary ObserverConnectIdentifier
  ObserverConnectIdentifier = ''
DGMGRL> show database standby ObserverConnectIdentifier
  ObserverConnectIdentifier = ''
DGMGRL> show database logical ObserverConnectIdentifier
  ObserverConnectIdentifier = ''
复制
  1. 我们将参数设置为其新值。
DGMGRL> edit database primary set property ObserverConnectIdentifier=PRIMARY;
Property "observerconnectidentifier" updated
DGMGRL> edit database logical set property ObserverConnectIdentifier=LOGICAL;
Property "observerconnectidentifier" updated
DGMGRL> edit database standby set property ObserverConnectIdentifier=STANDBY;
Property "observerconnectidentifier" updated
复制
  1. 我们检查是否设置了新值。
DGMGRL> show database primary ObserverConnectIdentifier
  ObserverConnectIdentifier = 'primary'
DGMGRL> show database standby ObserverConnectIdentifier
  ObserverConnectIdentifier = 'standby'
DGMGRL> show database logical ObserverConnectIdentifier
  ObserverConnectIdentifier = 'logical'
复制

4.我们说如果不设置参数,我们会使用DGConnectIdentifier。

查询 DGConnectIdentifier 以查看其值。

DGMGRL> show database logical DGConnectIdentifier
  DGConnectIdentifier = 'logical'
DGMGRL> show database primary DGConnectIdentifier
  DGConnectIdentifier = 'primary'
DGMGRL> show database standby DGConnectIdentifier
  DGConnectIdentifier = 'standby'
复制

d.观察者覆盖

即使 Standby Database 与 Primary 有通信,它也会指示在 Observer 与 Primary 的通信丢失的情况下是否会执行 Failover 操作。 默认为假。

MGRL> edit configuration set property ObserverOverride=FALSE;
Property "observeroverride" updated
DGMGRL> show configuration ObserverOverride
  ObserverOverride = 'FALSE'
复制

e. 观察者重新连接

它决定了观察者与主数据库建立连接的频率。 默认值为 0。

换句话说,最初会建立一个连接,然后就不会再请求建立一个连接了。

这样做的好处是它不会给系统带来新的连接负担,缺点是无法了解 Primary 是否会在没有新连接请求的情况下运行。

Oracle 建议设置此值,这样既不会太频繁地检测到连接负载,也不会太罕见地检测到太晚的通信断开。

DGMGRL> edit configuration set property ObserverReconnect=15;
Property "observerreconnect" updated
DGMGRL> show configuration ObserverReconnect
  ObserverReconnect = '15'
复制

D. 设置我们希望发生的附加条件

除参数外,出现以下情况时,可能无需等待 FastStartFailoverThreshold 值就请求触发 Failover。

当Datafile离线时,

当关键数据库对象中发生字典损坏时,

如果控制文件因磁盘问题而损坏,

如果 LGWR 进程无法写入在线重做日志,

如果归档过程由于相关路径中的空间不足而无法创建归档,则会执行 FAST START FAILOVER 操作。

当收到特定的 ORA 错误时……

1.这些特征是什么,可以看如下。

DGMGRL> show fast_start failover

Fast-Start Failover: DISABLED

  Threshold:          100 seconds
  Target:             (none)
  Observer:           (none)
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile            NO
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)
复制

2.我们可以启用一个默认为NO的条件,如下所示。

DGMGRL> enable fast_start failover condition "Inaccessible Logfile";
Succeeded.
DGMGRL> show fast_start failover

Fast-Start Failover: DISABLED

  Threshold:          100 seconds
  Target:             (none)
  Observer:           (none)
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile           YES
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    (none)
复制

3.我们可以启用特定的ORA错误如下。

DGMGRL> enable fast_start failover condition '1578';
Succeeded.
DGMGRL> show fast_start failover;

Fast-Start Failover: DISABLED

  Threshold:          100 seconds
  Target:             (none)
  Observer:           (none)
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile           YES
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    ORA-01578: ORACLE data block corrupted (file # %s, block # %s)

复制

E. 激活快速启动故障转移

在完成参数和所有条件设置后,我现在可以启用快速启动故障转移。

在这个阶段还没有观察者。 主数据库和快速启动故障转移备用数据库正在通信。

当我们启用快速启动故障转移时,我们将收到此警告。

DGMGRL> enable fast_start failover;
Enabled.
DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
      Warning: ORA-16819: fast-start failover observer not started

    standby - (*) Physical standby database
      Warning: ORA-16819: fast-start failover observer not started

    logical - Logical standby database

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

复制

激活期间落入日志的信息如下。

[Primary-1]——>ALERT_LOG

Fri Jan 27 13:33:54 2017
Fast-Start Failover (FSFO) has been enabled between:
  Primary = "primary"
  Standby = "standby"
Fri Jan 27 13:33:54 2017
FSFP started with pid=27, OS id=21775 
复制

[Primary-2]—–>ALERT_LOG

Fri Jan 27 13:34:12 2017
FSFP started with pid=49, OS id=31147 
复制

该过程由操作系统控制。

[root@primary1 ~]# ps -ef |grep fsfp |grep -v grep
oracle   21775     1  0 13:33 ?        00:00:00 ora_fsfp_primary1
复制
root@primary2 ~]# ps -ef |grep fsfp |grep -v grep
oracle   31147     1  0 13:34 ?        00:00:00 ora_fsfp_primary2
复制

F.起始观察者

Observer 必须首先在单独的服务器上运行(如果可用),或者在快速启动故障转移备用数据库上运行。

当 Observer 运行时,它告诉 Broker 通过 DGMGRL 管理 Data Guard Environment 的监控作业。

Data Guard 环境中只有 1 个观察者。

它通过一个包含观察者、主数据库和备用数据库的信息和连接定义的小配置文件来完成所有管理。

观察者是一个前台进程。 因此,它使命令提示符一直处于忙碌状态。

一旦停止,可以再次在命令提示符处执行某些操作。

因此,它应该处于可以连续工作的地步。

例如,在终端服务器上。

  1. 观察者启动。
DGMGRL> start observer;
Observer Started.
复制

2.我们正在查询配置的状态。

DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - (*) Physical standby database
    logical - Logical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS
复制

3.启动Observer的Terminal窗口用叉号关闭,Configuration的状态被质疑。

DGMGRL> show configuration

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - (*) Physical standby database
    logical - Logical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS
复制

尽管 Observer 没有运行,但它并没有在配置中给出错误警告。

原因是 ObserverReconnect 参数设置为 15 秒。

我们稍等片刻,再次提问。

DGMGRL> show configuration verbose

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
      Error: ORA-16820: fast-start failover observer is no longer observing this database

    standby - (*) Physical standby database
      Error: ORA-16820: fast-start failover observer is no longer observing this database

    logical - Logical standby database

  (*) Fast-Start Failover target

  Properties:
    FastStartFailoverThreshold      = '100'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '900'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '15'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: ENABLED

  Threshold:          100 seconds
  Target:             standby
  Observer:           standby1.tivibulab.local
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configuration Status:
ERROR
复制

G. 验证配置

所有操作完成后,检查配置是否有错误。

有3种方式。

  1. 查询broker配置。
DGMGRL> show configuration verbose

Configuration - Broker_Configuration

  Protection Mode: MaxPerformance
  Databases:
    primary - Primary database
    standby - (*) Physical standby database
    logical - Logical standby database

  (*) Fast-Start Failover target

  Properties:
    FastStartFailoverThreshold      = '100'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '900'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '15'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: ENABLED

  Threshold:          100 seconds
  Target:             standby
  Observer:           standby1.tivibulab.local
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configuration Status:
SUCCESS
复制
  1. 查询Fast_start Failover 配置。
DGMGRL> show fast_start failover

Fast-Start Failover: ENABLED

  Threshold:          100 seconds
  Target:             standby
  Observer:           standby1.tivibulab.local
  Lag Limit:          900 seconds
  Shutdown Primary:   TRUE
  Auto-reinstate:     TRUE
  Observer Reconnect: 15 seconds
  Observer Override:  FALSE

Configurable Failover Conditions
  Health Conditions:
    Corrupted Controlfile          YES
    Corrupted Dictionary           YES
    Inaccessible Logfile           YES
    Stuck Archiver                  NO
    Datafile Offline               YES

  Oracle Error Conditions:
    ORA-01578: ORACLE data block corrupted (file # %s, block # %s)
复制
  1. 我们从 v$DATABASE 视图中查询。
rimary-1] SQL> set linesize 9000
[Primary-1] SQL> column FS_FAILOVER_OBSERVER_HOST format a24
[Primary-1] SQL> select FS_FAILOVER_STATUS, FS_FAILOVER_CURRENT_TARGET, FS_FAILOVER_THRESHOLD, FS_FAILOVER_OBSERVER_PRESENT, FS_FAILOVER_OBSERVER_HOST from v$database;

FS_FAILOVER_STATUS     FS_FAILOVER_CURRENT_TARGET     FS_FAILOVER_THRESHOLD FS_FAILOVER_OBSERVER_PRESENT FS_FAILOVER_OBSERVER_HOST
---------------------- ------------------------------ --------------------- ------- ------------------------
TARGET UNDER LAG LIMIT standby                                          100 YES     st

复制

FS_FAILOVER_STATUS 列的值和含义

原文标题:Fast-Start Failover Configuration
原文作者:Onur ARDAHANLI
原文地址:https://dbtut.com/index.php/2022/08/08/fast-start-failover-configuration/

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论