[20150325]關於引數archive_lag_target.txt

lfree發表於2015-03-25

[20150325]關於引數archive_lag_target.txt

--今天同事在測試設定引數archive_lag_target遇到一些問題,自己也做一些測試:

DGMGRL>  show database test ArchiveLagTarget
  ArchiveLagTarget = '0'

DGMGRL> edit database test set PROPERTY ArchiveLagTarget=30;
Error: ORA-16790: the value of the configurable property is invalid

Failed.

$ oerr ORA 16790
16790, 0000, "the value of the configurable property is invalid"
// *Cause:  An invalid property value was entered, or a RESET was attempted
//          on a property for which no Broker default value exists.
// *Action: Set the property to a correct value.

--而使用sqlplus設定:
SCOTT@test> alter system set archive_lag_target=30 scope=memory ;
System altered.

SCOTT@test> show parameter ARCHIVE_LAG_TARGET

NAME                TYPE     VALUE
------------------- -------- -------
archive_lag_target  integer  60

--很明顯這個引數最小是60.即使你設定30.

$ ll /u01/app/oracle11g/archivelog/

-rw-r-----  1 oracle11g oinstall   781312 2015-03-25 09:51:44 1_2499_798551880.dbf
-rw-r-----  1 oracle11g oinstall    42496 2015-03-25 09:52:39 1_2500_798551880.dbf
-rw-r-----  1 oracle11g oinstall    37888 2015-03-25 09:53:43 1_2501_798551880.dbf
-rw-r-----  1 oracle11g oinstall   147456 2015-03-25 09:54:43 1_2502_798551880.dbf

--另外在dg設定,不生效,也許在切換後生效.

DGMGRL> show configuration  verbose
Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
      Warning: ORA-16792: configurable property value is inconsistent with database setting

    testdg - Physical standby database

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

Fast-Start Failover: DISABLED

Configuration Status:
WARNING

$ oerr ORA 16792
16792, 0000, "configurable property value is inconsistent with database setting"
// *Cause:  The values of one or more configurable properties were
//          inconsistent with database in-memory settings or server parameter
//          file settings. This may happen by directly altering initialization
//          parameters instead of editing configurable property values using
//          Data Guard broker.
// *Action: Query the InconsistentProperties property on the database or check
//          the Data Guard broker log to find which properties are set
//          inconsistently. Reset these properties to make them consistent
//          with the database settings. Alternatively, enable the database
//          or the entire configuration to allow the configurable property
//          settings to be propagated to the initialization parameters.

--這樣修改導致與dg配置不一致.我感興趣的是如何確定那個引數不一致.看了一下幫助,很簡單:

DGMGRL> show database   test InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE
            test     ArchiveLagTarget                   60                    0                    0

--也許是我修改到記憶體與spfile檔案不一致.

DGMGRL> edit database test set PROPERTY ArchiveLagTarget=60;
Property "archivelagtarget" updated
DGMGRL> show database verbose   test;

Database - test

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

  Properties:
    DGConnectIdentifier             = 'test'
    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                = '60'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u01/app/oracle11g/oradata/test, /u01/app/oracle11g/oradata/test'
    LogFileNameConvert              = '/u01/app/oracle11g/oradata/test, /u01/app/oracle11g/oradata/test'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    SidName                         = 'test'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hisdg)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=test_DGMGRL.com)(INSTANCE_NAME=test)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = '/u01/app/oracle11g/archivelog'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
SUCCESS


--收尾還原:
DGMGRL> edit database test set PROPERTY ArchiveLagTarget=0;
Property "archivelagtarget" updated
DGMGRL> edit database testdg set PROPERTY ArchiveLagTarget=0;
Property "archivelagtarget" updated

DGMGRL> show database verbose  testdg ArchiveLagTarget;
  ArchiveLagTarget = '0'
DGMGRL> show database verbose  test ArchiveLagTarget;
  ArchiveLagTarget = '0'

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

相關文章