zoukankan      html  css  js  c++  java
  • [Oracle工程师手记] Data Guard 环境中,查找最近发生的与 Data Guard 相关的错误的方法


    在主库和备库中,都可以通过如下的查询,获得关于是否发生了与 Data Guard 相关的结果:

    column message format a80
    SELECT ins.thread#, timestamp, message FROM gv$dataguard_status sts, gv$instance ins WHERE sts.inst_id = ins.inst_id
     AND severity in ('Error','Fatal') ORDER BY timestamp, thread#; 
    

     
    结果的例子:

    主库:

    SQL> column message format a80
    SQL>
    SQL> SELECT ins.thread#, timestamp, message FROM gv$dataguard_status sts, gv$instance ins WHERE sts.inst_id = ins.inst_id
         AND severity in ('Error','Fatal') ORDER BY timestamp, thread#;
    
    
    TIMESTAMP         THREAD#  MESSAGE
    --------                ------   --------
    15-2月 -2020 02:52:36     2      Error 12514 received logging on to the standby
    15-2月 -2020 02:52:36     2      TT02: Error 12514 attaching to RFS for reconnect
    15-2月 -2020 02:52:36     2      Error 3135 for archive log file 7 to 'cod_s'
    15-2月 -2020 02:52:37     1      Error 12514 received logging on to the standby
    15-2月 -2020 02:52:37     1      TT02: Error 12514 attaching to RFS for reconnect
    15-2月 -2020 02:52:37     1      Error 3135 for archive log file 4 to 'cod_s'
    15-2月 -2020 02:57:48     1      Error 12514 received logging on to the standby
    15-2月 -2020 02:58:09     2      Error 12514 received logging on to the standby
    

     
    备库:

    SQL> column message format a80
    SQL> SELECT ins.thread#, timestamp, message FROM gv$dataguard_status sts, gv$instance ins WHERE sts.inst_id = ins.inst_id
         AND severity in ('Error','Fatal') ORDER BY timestamp, thread#;
    
    
    TIMESTAMP         THREAD#     MESSAGE
    ---------               -------         -------
    15-2月 -2020 03:04:04     1         Error 12154 received logging on to the standby
    15-2月 -2020 03:04:04     1         FAL[client, ARC1]: Error 12154 connecting to cod_p01,cod_p02 for fetchin g gap sequence
    
  • 相关阅读:
    架构优秀文章汇总
    SpringCloud-Hystrix 注解配置Hystrix && 和FeignClient集成 (转)
    SpringCloud-Hystrix(服务熔断,服务降级)(1)
    java 锁 -乐观锁、悲观锁  Volatile
    JS OOP -02 深入认识JS中的函数
    JS OOP -01 面向对象的基础
    JS OOP 概述
    拆表策略
    双重检查加锁机制(并发insert情况下数据重复插入问题的解决方案)
    C# 理解lock
  • 原文地址:https://www.cnblogs.com/gaojian/p/14642159.html
Copyright © 2011-2022 走看看