• ADG 如何配置Fast Start Failover FSFO


    GOAL

    *** Reviewed for Relevance 16-Jul-2015 ***

    Once a broker configuration has been established  addressing the Business' requirements for protecting the environment from data loss need to be considered and potentially addressed through further configuration of the Data Guard environment.

    This document examines in detail the process for enabling the MaxAvailability and MaxProtection protection modes, Fast Start Failover and the Data Guard Observer.

    SOLUTION

    ========

    Disclaimer:

    NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

    For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

    Data Guard Configuration: rs1_dg

    Observer:
    Host: grid2vm1 Net Connection Alias: rs1_prm_obsrv, rs1_prm_obsrv_dgmgrl, rs1_stb_obsrv, rs1_stb_obsrv_dgmgrl

    Primary Site:
    Host: grid1vm1  -  DB_Name: rs1  -   DB_unique_name: rs1  -  Net Connection Alias: rs1_prm

    Standby Site:
    Host: grid1vm2  - DB_Name rs1  -  DB_unique_name: rs1_stb  -  Net Connection_Alias: rs1_stb

    ========

    The Current Broker Configuration

    There are 3 nodes involved here grid1vm1 (the Primary Site), grid1vm2 (the Standby Site) and grid2vm1 (the Observer site)

    All sites are running 11.2.0.3 Enterprise Edition

    DGMGRL> show configuration verbose;

    Configuration - rs1_dg  Protection Mode: MaxPerformance
      Databases:
        rs1     - Primary database
        rs1_stb - Physical standby database

      Properties:
        FastStartFailoverThreshold      = '30'
        OperationTimeout                = '30'
        FastStartFailoverLagLimit       = '30'
        CommunicationTimeout            = '180'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    The Primary Site Broker Configuration

    DGMGRL> show database verbose rs1

    Database - rs1

      Role:            PRIMARY
      Intended State:  TRANSPORT-ON
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_prm'
        ObserverConnectIdentifier       = ''
        LogXptMode                      = 'ASYNC'
        DelayMins                       = '0'
        Binding                         = 'optional'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'MANUAL'
        ArchiveLagTarget                = '0'     LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = ''
        LogFileNameConvert              = ''
        FastStartFailoverTarget         = ''
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=grid1vm1)(PORT=))(CONNECT_DATA=(SERVICE_NAME=rs1_DGMGRL.)(INSTANCE_NAME=rs1)(SERVER=DEDICATED)))'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

     The Standby Site Broker Configuration

    DGMGRL> show database verbose rs1_stb;

    Database - rs1_stb

      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: OFF
      Instance(s):
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_stb'
        ObserverConnectIdentifier       = ''
        LogXptMode                      = 'ASYNC'
        DelayMins                       = '0'
        Binding                         = 'OPTIONAL'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'AUTO'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = 'rs1, rs1_stb'
        LogFileNameConvert              = 'rs1, rs1_stb'
        FastStartFailoverTarget         = ''
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=grid1vm2.)(PORT=))(CONNECT_DATA=(SERVICE_NAME=rs1_stb_DGMGRL.)(INSTANCE_NAME=rs1)(SERVER=DEDICATED)))'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

    Configuring Failover Thresholds

    Should you to alter the default Thresholds that determine when and why a failover may occur edit the following configuration settings

    To alter the amount of time the observer attempts to reconnect to the Primary after it has detected problem and the number of seconds it waits on failed connect attempts before initiating a failover edit the configuration property FastStartFailoverThreshold.

    DGMGRL> edit configuration set property FastStartFailoverThreshold=45;
    Property "faststartfailoverthreshold" updated

    Display the configuration to confirm the settings have been successfully altered.

    DGMGRL> show configuration verbose;

    Configuration - rs1_dg

    Protection Mode: MaxPerformance

    Databases:

    rs1 - Primary database
    rs1_stb - Physical standby database

    Properties:
    FastStartFailoverThreshold = '45'
    OperationTimeout = '30'
    FastStartFailoverLagLimit = '45'
    CommunicationTimeout = '180'
    FastStartFailoverAutoReinstate = 'TRUE'
    FastStartFailoverPmyShutdown = 'TRUE'
    BystandersFollowRoleChange = 'ALL'

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    To alter the maximum amount of redo lag time in seconds that is allowed to exist between the sites when a failover is attempted alter FastStartFailoverLagLimit.  If the lag time between the sites exceeds this limit then a failover will not be allowed as there would be to much data lost should the standby site have been activated.

    DGMGRL> edit configuration set property FastStartFailoverLagLimit=45;
    Property "faststartfailoverlaglimit" updated

    The Observer OracleNET configuration


    The Observer requires its own connections to each database in the configuration.  ObserverConnectIdentifier is used to add these TNS Alias entries into each databases configuration.  When starting the observer one of these connections must be used to establish the initial observer connection that is going to be used during the actual startup operation of the observer. By default the ObserverConnectIdentifier setting is null and it is falling back to the DGConnectIdentifier value.
     

    DGMGRL> show database rs1 ObserverConnectIdentifier
      ObserverConnectIdentifier = ''

    DGMGRL> show database rs1_stb ObserverConnectIdentifier
      ObserverConnectIdentifier = ''

     

    The Observer machine has 11.2.0.3 installed.  The version must match that of the sites in the configuration.  The install can be either a client install or a complete Enterprise Edition install. In the Observer site TNS Aliases must be created for both the statically registered listener services and the ObserverConnectIdentifier entries. The Static Listener entries will be used during any editing of the broker configuration from the Observer machine. The ObserverConnectIdentifier aliases will be used to start and stop the observer.

    The following is configured in the tnsnames.ora.  Aliases must be configured for both the primary and standby sites and these entries will be placed in the TNSNAMES.ORA at all sites including the Primary, Standby and Observer sites.

    This ObserverConnectIdentifier alias must be dynamically registered in each sites listener and in RAC enabled for failover between RAC instances.

    The Observer site TNSNAMES.ORA entries

    Observer Specific TNS Aliases

    RS1_PRM_OBSRV =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = grid1vm1.)(PORT = ))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = rs1.)
        )
      )

    RS1_STB_OBSRV =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = grid1vm2.)(PORT = ))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = rs1_stb.)
        )
      )

     
    Observer Static TNS Alias Entries

    The aliases that are to used to perform configuration tasks resolve to listener services that are statically registered.  That is they are manually configured in the listener at each site.
     

    RS1_PRM_OBSRV_DGMGRL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = grid1vm1.)(PORT = ))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = rs1_prm_dgmgrl.)
        )
      )

    RS1_STB_OBSRV_DGMGRL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = grid1vm2.)(PORT = ))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = rs1_stb_dgmgrl.)
        )
      )

     

    Testing the Observer Site TNS Aliases

    Test ALL the TNS aliases used by the observer using BOTH tnsping and sqlplus SYSDBA remote connections.  These must succeed from the observer site and each database site that is a part of the configuration.  The test will need to be repeated from each site that is a member of the Data Guard Broker configuration plus the Observer site.

    For Example from the Standby site:

    TNSPING from the Standby site to an Observer alias

    [oracle@grid1vm2 ~]$ tnsping rs1_prm_obsrv

    TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 28-NOV-2012 10:13:36
    Copyright (c) 1997, 2011, Oracle.  All rights reserved.


    Used parameter files:


    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = grid1vm1.)(PORT = )) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rs1.)))
    OK (20 msec)

     

     

    SQLPlus SYSDBA based connection to the same alias

    [oracle@grid1vm2 ~]$ sqlplus sys@rs1_prm_obsrv as sysdba

    SQL*Plus: Release 11.2.0.3.0 Production on Wed Nov 28 10:13:54 2012

    Copyright (c) 1982, 2011, Oracle.  All rights reserved.

    Enter password:

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options

    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options

    These same tests will need to be performed against the TNS Aliases that resolve to the statically registered listener services.
    The tests will need to be repeated against all aliases used by the observers from all sites.

    Configuring the ObserverConnectIdentifier Property in the Data Guard Configuration

    The alias used when connecting into the observer MUST be the same as the alias set in the broker configuration for the property ObserverConnectIdentifier

    To add the ObserverConnectIdentifiers use the following.

    For the Primary Site

    DGMGRL> edit database rs1 set property ObserverConnectIdentifier='rs1_prm_obsrv';
    Property "observerconnectidentifier" updated


    For the Standby Site

    DGMGRL> edit database rs1_stb set property ObserverConnectIdentifier='rs1_stb_obsrv';
    Property "observerconnectidentifier" updated

     
    Check the settings using

    DGMGRL> show database rs1 ObserverConnectIdentifier;
      ObserverConnectIdentifier = 'rs1_prm_obsrv'
    DGMGRL> show database rs1_stb ObserverConnectIdentifier;
      ObserverConnectIdentifier = 'rs1_stb_obsrv'

     


    Now that the connections and thresholds are in place attempt to enable fast start failover.

    Enable Fast Start Failover


    From the Oberserver site

    Connect to the Primary using the Observer TNS Alias

    [oracle@grid2vm1 ~]$ dgmgrl sys/@rs1_prm_obsrv
    DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production

    Copyright (c) 2000, 2009, Oracle. All rights reserved.

    Welcome to DGMGRL, type "help" for information.
    Connected.

    Ensure the configuration can be viewed successfully using the Observer site

    DGMGRL> show configuration;

    Configuration - rs1_dg

      Protection Mode: MaxPerformance
      Databases:
        rs1     - Primary database
        rs1_stb - Physical standby database

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    Attempt to Enable Fast Start Failover

    DGMGRL> enable fast_start failover;
    Error: ORA-16651: requirements not met for enabling fast-start failover

    Failed.

     
    Currently there is the configuration does not allow fast start failover to be enabled.

    Troubleshooting a failure in enabling Fast Start Failover

    Looking at the error there are a number of potential causes for this error that include the mix of protection mode and Log shipping modes that the sites are currently configured with.  These will need to be alered.

    oerr ora 16627
    16627, 0000, "operation disallowed since no standby databases would remain to support protection mode"
    // *Cause:  This status was returned because of one of the following:
    //          - The broker rejected an attempt to change the overall
    //            configuration protection mode since it could not find any
    //            enabled standby databases that supported the proposed protection
    //            mode.
    //          - The broker rejected an attempt to enable the configuration
    //            if it determined that there were no enabled standby databases
    //            that supported the overall protection mode.
    //          - The broker rejected an attempt to disable or remove a database
    //            that, if disabled or deleted, would result in no remaining
    //            standby databases that could support the overall configuration
    //            protection mode.
    //          - The broker rejected an attempt to switchover if doing so would
    //            violate the overall configuration protection mode.
    //          - Performing automatic health check if the broker determined that
    //            no standby datbases supported the overall protection mode.
    // *Action: - If changing the overall protection mode, confirm that at least
    //            one standby database satisfies the new protection mode.
    //          - For enable failures, confirm that at least one standby database
    //            has a LogXptMode configurable property setting that supports
    //            the current overall protection mode.
    //          - For delete and disable failures, confirm that at least one
    //            other standby database has a LogXptMode configurable property
    //            setting that supports the overall protection mode.
    //          - For switchover failures that occur when the configuration
    //            is operating in maximum protection or maximum availability
    //            mode, confirm that at least one other standby database has its
    //            LogXptMode configurable property set to the value "SYNC".
    //            If the configuration contains a primary database and a single
    //            standby database and is operating in either maximum protection
    //            or maximum availability mode, ensure that the LogXptMode
    //            configurable property of the primary database is set to the
    //            value "SYNC". Since the old primary database will become the
    //            standby database after switchover completes, its LogXptMode
    //            configurable property setting must support the configuration
    //            protection mode.
    //          - For health check error, confirm that at least one standby
    //            database has a LogXptMode configurable property setting
    //            that supports the current overall protection mode.

    Establish Max Protection Mode

    As this Data Guard configuration is to run in MaxProtection mode the following is performed to establish this mode prior to enabling fast start failover.

    Currently it is running MaxPerformance mode

    DGMGRL> show configuration verbose;

    Configuration - rs1_dg

      Protection Mode: MaxPerformance
      Databases:
        rs1     - Primary database
        rs1_stb - Physical standby database

      Properties:
        FastStartFailoverThreshold      = '45'
        OperationTimeout                = '30'
        FastStartFailoverLagLimit       = '45'
        CommunicationTimeout            = '180'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    Log Shipping is being performed using LGWR ASYNC as seen via the LogXPTMode property, Standby file management is set to Manual (StandbyFileManagement property) and no Fast Start Failover target (FastStartFailover property in the primary site) has been set. These will need to be altered.

    Each site must also have Flashback Database enabled.

    The sites' current configuration.

    DGMGRL> show database verbose rs1;

    Database - rs1

      Role:            PRIMARY
      Intended State:  TRANSPORT-ON
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_prm'
        ObserverConnectIdentifier       = 'rs1_stb_obsrv'
        LogXptMode                      = 'async'
        DelayMins                       = '0'
        Binding                         = 'optional'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'MANUAL'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = ''
        LogFileNameConvert              = ''
        FastStartFailoverTarget         = ''
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = 'rs1_prm_dgmgrl'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

     

    DGMGRL> show database verbose rs1_stb;

    Database - rs1_stb

      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: OFF
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_stb'
        ObserverConnectIdentifier       = 'rs1_stb'
        LogXptMode                      = 'async'

        DelayMins                       = '0'
        Binding                         = 'OPTIONAL'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'AUTO'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = 'rs1, rs1_stb'
        LogFileNameConvert              = 'rs1, rs1_stb'
        FastStartFailoverTarget         = ''
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = 'rs1_stb_dgmgrl'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

     

     

    Disable managed recovery in the standby site

    DGMGRL> edit database rs1_stb set state=APPLY-OFF;
    Succeeded.

    Enable Flashback Database

    Flashback must be enabled in ALL the database sites.  It was turned on in the primary but had not yet been enabled in the standby site.

    The Standy site

    SQL> select open_mode,flashback_on from v$database;

    OPEN_MODE            FLASHBACK_ON
    MOUNTED              NO

    SQL> alter database flashback on;

    Database altered.

    Set Log shipping to LGWR SYNC by setting the property LogXPTMode to SYNC

    The Log shipping mode needs to be set to SYNC in both the sites.
     

    DGMGRL> connect sys@rs1_prm_obsrv
    Password:
    Connected.

    DGMGRL> edit database rs1 set property LogXptMode='SYNC';
    Property "logxptmode" updated
    DGMGRL> edit database rs1_stb set property LogXptMode='SYNC';
    Property "logxptmode" updated

    Alter the configuration to enable MaxProtection.

    DGMGRL> edit configuration set protection mode as MaxProtection;


    Operation requires shutdown of instance "rs1" on database "rs1"
    Shutting down instance "rs1"...
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "rs1" on database "rs1"
    Starting instance "rs1"...
    Unable to connect to database
    ORA-12154: TNS:could not resolve the connect identifier specified

    Failed.
    Warning: You are no longer connected to ORACLE.

    Please complete the following steps to finish the operation:
            start up instance "rs1" of database "rs1"

    DGMGRL> exit



    In this case the connection used to invoke dgmgrl was not one that specified the TNS alias that resolved to the statically registered listener service.

    It is for this reason that the Primary site could NOT be automatically restarted by the broker.

    A manual startup of the Primary site instance(s) will correct this.
     

    [oracle@grid1vm1 ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.3.0 Production on Wed Nov 28 11:05:20 2012

    Copyright (c) 1982, 2011, Oracle.  All rights reserved.

    Connected to an idle instance.

    SQL> startup
    ORACLE instance started.

    Total System Global Area  417546240 bytes
    Fixed Size                  2228944 bytes
    Variable Size             176164144 bytes
    Database Buffers          230686720 bytes
    Redo Buffers                8466432 bytes
    Database mounted.
    Database opened.

     The configuration has now been altered and Max Protection Mode enabled.

    [oracle@grid2vm1 ~]$ dgmgrl sys/@rs1_prm_obsrv_dgmgrl
    DGMGRL for Linux: Version 11.2.0.3.0 - 64bit Production

    Copyright (c) 2000, 2009, Oracle. All rights reserved.

    Welcome to DGMGRL, type "help" for information.
    Connected.
    DGMGRL> show configuration;

    Configuration - rs1_dg

      Protection Mode: MaxProtection
      Databases:
        rs1     - Primary database
        rs1_stb - Physical standby database

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    To set the environment to run MaxAvailability Mode

    Should the protection mode need to be alered to MaxAvailability

    DGMGRL> edit configuration set protection mode as MaxAvailability;
    Succeeded.


    DGMGRL>  show configuration verbose;

    Configuration - rs1_dg

      Protection Mode: MaxAvailability
      Databases:
        rs1     - Primary database
        rs1_stb - Physical standby database

      Properties:
        FastStartFailoverThreshold      = '45'
        OperationTimeout                = '30'
        FastStartFailoverLagLimit       = '45'
        CommunicationTimeout            = '180'
        FastStartFailoverAutoReinstate  = 'TRUE'
        FastStartFailoverPmyShutdown    = 'TRUE'
        BystandersFollowRoleChange      = 'ALL'

    Fast-Start Failover: DISABLED

    Configuration Status:
    SUCCESS

    Enable Automatic file management in the sites.

    At this point Standby file management is set to manual so this will be set to auto so that file addition at the primary will not impact managed recovery.

    DGMGRL> show database verbose rs1;

    Database - rs1

      Role:            PRIMARY
      Intended State:  TRANSPORT-ON
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_prm'
        ObserverConnectIdentifier       = 'rs1_prm_obsrv'
        LogXptMode                      = 'SYNC'
        DelayMins                       = '0'
        Binding                         = 'optional'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'MANUAL'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = ''
        LogFileNameConvert              = ''
        FastStartFailoverTarget         = 'rs1_stb'
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = 'rs1_prm_dgmgrl'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

    In both sites set the property StandbyFileManagement to automatic

    DGMGRL> edit database rs1 set property StandbyFileManagement='AUTO';
    Property "standbyfilemanagement" updated

    DGMGRL> edit database rs1_stb set property StandbyFileManagement='AUTO';
    Property "standbyfilemanagement" updated

    Standby site

    DGMGRL> show database verbose rs1_stb;

    Database - rs1_stb

      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: OFF
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_stb'
        ObserverConnectIdentifier       = 'rs1_stb_obsrv'
        LogXptMode                      = 'SYNC'
        DelayMins                       = '0'
        Binding                         = 'OPTIONAL'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'AUTO'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = 'rs1, rs1_stb'
        LogFileNameConvert              = 'rs1, rs1_stb'
        FastStartFailoverTarget         = ''
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = 'rs1_stb_dgmgrl'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

    Primary Site

    DGMGRL> show database verbose rs1;

    Database - rs1

      Role:            PRIMARY
      Intended State:  TRANSPORT-ON
      Instance(s):
        rs1

      Properties:
        DGConnectIdentifier             = 'rs1_prm'
        ObserverConnectIdentifier       = 'rs1_prm_obsrv'
        LogXptMode                      = 'SYNC'
        DelayMins                       = '0'
        Binding                         = 'optional'
        MaxFailure                      = '0'
        MaxConnections                  = '1'
        ReopenSecs                      = '300'
        NetTimeout                      = '30'
        RedoCompression                 = 'DISABLE'
        LogShipping                     = 'ON'
        PreferredApplyInstance          = ''
        ApplyInstanceTimeout            = '0'
        ApplyParallel                   = 'AUTO'
        StandbyFileManagement           = 'AUTO'
        ArchiveLagTarget                = '0'
        LogArchiveMaxProcesses          = '4'
        LogArchiveMinSucceedDest        = '1'
        DbFileNameConvert               = ''
        LogFileNameConvert              = ''
        FastStartFailoverTarget         = 'rs1_stb'
        InconsistentProperties          = '(monitor)'
        InconsistentLogXptProps         = '(monitor)'
        SendQEntries                    = '(monitor)'
        LogXptStatus                    = '(monitor)'
        RecvQEntries                    = '(monitor)'
        SidName                         = 'rs1'
        StaticConnectIdentifier         = 'rs1_prm_dgmgrl'
        StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'
        AlternateLocation               = ''
        LogArchiveTrace                 = '0'
        LogArchiveFormat                = '%t_%s_%r.dbf'
        TopWaitEvents                   = '(monitor)'

    Database Status:
    SUCCESS

    Enable Fast Start Failover


    Now that the broker configuration is complete fast start failover can be enabled.

    DGMGRL> enable fast_start failover;
    Enabled.

    Start the Data Guard Broker Observer in the Observer Site

    Now that fast start failover is enabled the broker can be started. Log into the observer machine and start the Faststart Failover observer.

    [oracle@grid2vm1 ]$ dgmgrl -logfile /obsrv.log sys/@rs1_prm_obsrv "start observer" &

    Community Discussions

    Still have questions? Consider posting a discussion in the High Availability Data Guard, Sharding and Global Data Services (MOSC) Community.

  • 相关阅读:
    Mybatis的关系关联配置
    借助SpotBugs将程序错误扼杀在摇篮中
    从 C 到 C++ 编程 — 面向对象编程
    给定任意字符串,反转字符串中的单词
    安卓开发--如何将onPostExecute方法结果返回给调用方?
    * 论文笔记 【OffDQ: An Offline Deep Learning Framework for QoS Prediction】
    低代码开发平台NocoBase的安装
    牛客网之SQL100题(3)-排序、关联关系
    Android 第三十六章 DatePickerDialog
    Llama2-Chinese项目:2.1-Atom-7B预训练
  • 原文地址:https://blog.csdn.net/jnrjian/article/details/134481543