[DGMGRL]ORA錯誤解決(ORA-16829: fast-start failover configuration is lagging)

梓沐發表於2016-02-15

錯誤環境如下,主備庫都有ORA-16829: fast-start failover configuration is lagging

[oracle@primary ~]$ dgmgrl sys/oracle

DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

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

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

Configuration - orcl

  Protection Mode: MaxPerformance
  Databases:
    orcl - Primary database
      Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database

    dg   - (*) Physical standby database
      Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

DGMGRL> show database orcl

Database - orcl

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

  Database Warning(s):
    ORA-16829: fast-start failover configuration is lagging
    ORA-16819: fast-start failover observer not started

Database Status:
WARNING

DGMGRL> show database dg;

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 13 seconds ago)
  Apply Lag:       9 hours 35 minutes 44 seconds (computed 13 seconds ago)
  Apply Rate:      0 Byte/s
  Real Time Query: OFF
  Instance(s):
    dg

  Database Warning(s):
    ORA-16829: fast-start failover configuration is lagging
    ORA-16819: fast-start failover observer not started

Database Status:

WARNING

主庫配置引數

DGMGRL> show database verbose orcl

Database - orcl

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

  Database Warning(s):
    ORA-16829: fast-start failover configuration is lagging
    ORA-16819: fast-start failover observer not started

  Properties:
    DGConnectIdentifier             = 'orcl'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '1'

    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               = '/u01/oracle/oradata/dg/, /u01/oracle/oradata/orcl/'
    LogFileNameConvert              = '/u01/archive/dg, /u01/archive/orcl'
    FastStartFailoverTarget         = 'dg'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName                         = 'orcl'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primary)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl_DGMGRL)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = '/u01/archive/orcl'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.arc'
    TopWaitEvents                   = '(monitor)'

Database Status:
WARNING

DGMGRL> show database verbose dg

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   3 minutes 29 seconds (computed 2 seconds ago)
  Apply Lag:       9 hours 38 minutes 44 seconds (computed 2 seconds ago)
  Apply Rate:      0 Byte/s
  Real Time Query: OFF
  Instance(s):
    dg

  Database Warning(s):
    ORA-16829: fast-start failover configuration is lagging
    ORA-16819: fast-start failover observer not started

  Properties:
    DGConnectIdentifier             = 'dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '1'

    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               = '/u01/oracle/oradata/orcl/, /u01/oracle/oradata/dg/'
    LogFileNameConvert              = '/u01/archive/orcl, /u01/archive/dg'
    FastStartFailoverTarget         = 'orcl'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName                         = 'dg'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=standby)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dg_DGMGRL)(INSTANCE_NAME=dg)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = '/u01/archive/dg'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.arc'
    TopWaitEvents                   = '(monitor)'

Database Status:
WARNING

解決方式:

1.關閉fast_start failover

DGMGRL> disable fast_start failover
Disabled.


2.備庫重啟

SQL> shutdown abort
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

3.備庫執行實施同步語句

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

4.過一段時間再檢查備庫狀態,發現恢復正常

DGMGRL> show database dg

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 1 second ago)
  Apply Lag:       0 seconds (computed 1 second ago)

  Apply Rate:      0 Byte/s
  Real Time Query: ON
  Instance(s):
    dg
但是接著又出現apply lag

DGMGRL> show database dg

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       2 minutes 37 seconds (computed 0 seconds ago)

  Apply Rate:      0 Byte/s
  Real Time Query: ON
  Instance(s):
    dg

5.將DelayMins設定0

DGMGRL> edit database orcl set property DelayMins=0;
Property "delaymins" updated

DGMGRL> edit database dg set property DelayMins=0;
Property "delaymins" updated

繼續不斷檢查dg的狀態

DGMGRL> show database dg

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       0 seconds (computed 0 seconds ago)

  Apply Rate:      0 Byte/s
  Real Time Query: ON
  Instance(s):
    dg

Database Status:
SUCCESS
6.重新開啟fast_start failover

DGMGRL> enable fast_start failover
Enabled.

DGMGRL> show configuration

Configuration - orcl

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

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

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

這時發現ORA-16829錯誤已經消失,ORA-16819錯誤這裡不再贅述

6.備庫執行取消同步語句,全部使用DGMGRL工具管理

SQL> alter database recover managed standby database cancel;

Database altered.

取消後發現錯誤再次出現

DGMGRL> show database dg;

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       0 seconds (computed 0 seconds ago)
  Apply Rate:      (unknown)
  Real Time Query: OFF
  Instance(s):
    dg

  Database Error(s):
    ORA-16766: Redo Apply is stopped

  Database Warning(s):
    ORA-16829: fast-start failover configuration is lagging
    ORA-16819: fast-start failover observer not started

Database Status:
ERROR

7.對備庫使用DGMGRL重啟APLLY

DGMGRL> edit database dg set state="APPLY-OFF";
Succeeded.
DGMGRL> edit database dg set state="APPLY-ON";
Succeeded.

最後發現一切正常

DGMGRL> show database dg;

Database - dg

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 1 second ago)
  Apply Lag:       0 seconds (computed 1 second ago)
  Apply Rate:      0 Byte/s
  Real Time Query: ON
  Instance(s):
    dg

  Database Warning(s):
    ORA-16819: fast-start failover observer not started

Database Status:
WARNING


錯誤總結:在使用了DGMGRL來管理Dataguard時,就千萬不要再使用SQLPLUS命令列來管理了,所有的操作必須都要在DGMGRL下進行修改配置,否則會造成引數衝突,導致問題排查困難,造成不必要的勞動




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

相關文章