使用broker监控dataguard

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用broker监控dataguard相关的知识,希望对你有一定的参考价值。

使用broker查看dataguard信息时有告警

DGMGRL> show configuration;

Configuration - DRTEST

Protection Mode: MaxPerformance
Databases:
ora11gn1 - Primary database
ora11gn2 - Physical standby database
Warning: ORA-16792: configurable property value is inconsistent with database setting

Fast-Start Failover: DISABLED

Configuration Status:
WARNING

  

查看是哪个库出现的告警

DGMGRL> show database ora11gn1;

Database - ora11gn1

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

Database Status:
SUCCESS

DGMGRL> show database ora11gn2;

Database - ora11gn2

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: ON
  Instance(s):
    ora11gn
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

Database Status:
WARNING

  

原来是standby端的redo日志格式属性与数据库设置不一致,查看该属性的值

DGMGRL> show database verbose ora11gn2;

Database - ora11gn2

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: ON
  Instance(s):
    ora11gn
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

  Properties:
    DGConnectIdentifier             = ‘ora11gn2‘
    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               = ‘/u01/oradata/ora11gn/, /u01/oradata/ora11gn/‘
    LogFileNameConvert              = ‘/u01/oradata/ora11gn/, /u01/oradata/ora11gn/‘
    FastStartFailoverTarget         = ‘‘
    InconsistentProperties          = ‘(monitor)‘
    InconsistentLogXptProps         = ‘(monitor)‘
    SendQEntries                    = ‘(monitor)‘
    LogXptStatus                    = ‘(monitor)‘
    RecvQEntries                    = ‘(monitor)‘
    SidName                         = ‘ora11gn‘
    StaticConnectIdentifier         = ‘(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora11gdg-s1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ora11gn2_DGMGRL)(INSTANCE_NAME=ora11gn)(SERVER=DEDICATED)))‘
    StandbyArchiveLocation          = ‘USE_DB_RECOVERY_FILE_DEST‘
    AlternateLocation               = ‘‘
    LogArchiveTrace                 = ‘0‘
    LogArchiveFormat                = ‘log_%d_%T_%s_%p.arc‘
    TopWaitEvents                   = ‘(monitor)‘

Database Status:
WARNING

  

broker设置的属性值LogArchiveFormat = ‘log_%d_%T_%s_%p.arc‘

进一步查看broker的监控属性InconsistentProperties

DGMGRL> show database ora11gn2 InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE 
         ora11gn     LogArchiveFormat         %t_%s_%r.dbf  log_%d_%T_%s_%p.arc  log_%d_%T_%s_%p.arc 

这里明确显示了spfile与broker是一致的,由于该参数无法在线修改,所以spfile中的值只能等下一次重启后才能生效;为了消除报错,可将spfile和broker的值都改回修改前的,与MEMORY_VALUE一致,或者只临时修改broker中的属性值,但下一次重启前记得要修改成与spfile一致,否则重启后这里还会有告警

DGMGRL> EDIT DATABASE ora11gn2 SET PROPERTY LogArchiveFormat=‘%t_%s_%r.dbf‘;
Property "logarchiveformat" updated
DGMGRL> show configuration;

Configuration - DRTEST

  Protection Mode: MaxPerformance
  Databases:
    ora11gn1 - Primary database
    ora11gn2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> show database ora11gn2 InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE 

上面使用show database verbose命令输出的属性值为‘(monitor)‘的是用于监控的只读属性,主要有

■ InconsistentLogXptProps  不一致的redo日志传输属性(primary)

■ LogXptStatus  redo日志传输状态(primary)

■ InconsistentProperties  不一致的数据库属性

■ SendQEntries  日志发送信息(primary)

■ RecvQEntries  日志接收信息(standby)

■ StatusReport  报错或告警

■ LatestLog  最近的drc告警日志(drc<db_unique_name>.log)信息

■ TopWaitEvents  top5等待事件(v$system_event)

以上是关于使用broker监控dataguard的主要内容,如果未能解决你的问题,请参考以下文章

12c DataGuard Broker配置步骤

19c 探索高可用系列 - RAC+DataGuard Broker

oracle 11g dataguard之dgmgrl

IMPLEMENTING FAST-START FAILOVER IN 10GR2 DATAGUARD BROKER ENVIRONMENT [ID 359555.1]

Oracle11g 配置DG broker

Logon database Tiger引起DataGuard不同步问题