[DGMGRL]ORA错误解决(ORA-16829: fast-start failover configuration is lagging)

来源:互联网 发布:v7000数据迁移图文教程 编辑:程序博客网 时间:2024/05/04 19:53

错误环境如下,主备库都有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下进行修改配置,否则会造成参数冲突,导致问题排查困难,造成不必要的劳动




0 0