[20161008]修改dg模式.txt

lfree發表於2016-10-08

[20161008]修改dg模式.txt

--dg支援3種模式,最大效能,最大可利用,最大保護.
--一般使用最多的最大效能,測試修改為最大可利用模式.

1.環境:

SYS@test> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.3.0     Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
    testdg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

2.修改模式:

DGMGRL> edit configuration set protection mode as maxavailability;
Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode
Failed.

--//不行,要修改傳輸模式。
$ 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.


DGMGRL> show database testdg 'LogXptMode';
  LogXptMode = 'ASYNC'

SYS@test> show parameter log_archive_dest_2
NAME                TYPE    VALUE
------------------- ------- ----------------------------------------------------------------------------------------------------
log_archive_dest_2  string  service="testdg", LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connect
                            ions=1 reopen=300 db_unique_name="testdg" net_timeout=30, valid_for=(all_logfiles,primary_role)

DGMGRL> edit database testdg set PROPERTY LogXptMode='SYNC';
Property "logxptmode" updated

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

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxAvailability
  Databases:
    test   - Primary database
    testdg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

SYS@test> show parameter log_archive_dest_2
NAME               TYPE    VALUE
------------------ ------- ----------------------------------------------------------------------------------------------------
log_archive_dest_2 string  service="testdg", LGWR SYNC AFFIRM delay=0 optional compression=disable max_failure=0 max_connection
                           s=1 reopen=300 db_unique_name="testdg" net_timeout=30, valid_for=(all_logfiles,primary_role)

--//注:改動的引數是test主庫的log_archive_dest_2,以前我一致以為是dg的引數,實際上是主庫傳輸到備庫的引數。

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

相關文章