zoukankan      html  css  js  c++  java
  • Automatic Diagnostic Repository

    转载自

    http://www.eygle.com/archives/2007/08/11g_auto_diag_repository.html#comments

    Oracle Database 11g的FDI(Fault Diagnosability Infrastructure)是自动化诊断方面的又一增强。
    FDI的一个关键组件是自动诊断库(Automatic Diagnostic Repository-ADR)。

    在Oracle Database 11g之前,Oracle的各类跟踪文件、日志文件等诊断文件的存储位置并不统一,现在在FDI的基础架构之上,Oracle开始统一规划这些文件的存储,ADR之于诊断文件,就类似于OFA(Optimal Flexible Architecture )之于数据库文件,FRA(Flash Recovery Area)之于备份文件。

    ADR的路径被称为ADR BASE,这个位置由一个新的初始化参数DIAGNOSTIC_DEST决定。


    SQL> show parameter diagnostic_dest


    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    diagnostic_dest                      string      /opt/oracle


    这个参数的缺省值和环境变量ORACLE_BASE有关:
    ■ 如果设置了 ORACLE_BASE 则 DIAGNOSTIC_DEST = ORACLE_BASE
    ■ 如果未设置 ORACLE_BASE ,则 DIAGNOSTIC_DEST = ORACLE_HOME/log

    我们可以简单看一下ADR BASE的目录结构:


    [oracle@test126 ~]$ tree -d diag/
    diag/
    |-- asm
    |-- clients
    |-- crs
    |-- diagtool
    |-- lsnrctl
    |-- netcman
    |-- ofm
    |-- rdbms
    |   `-- eygle
    |       `-- eygle
    |           |-- alert
    |           |-- cdump
    |           |-- hm
    |           |-- incident
    |           |-- incpkg
    |           |-- ir
    |           |-- lck
    |           |-- metadata
    |           |-- stage
    |           |-- sweep
    |           `-- trace
    `-- tnslsnr
        `-- test126
            `-- listener
                |-- alert
                |-- cdump
                |-- incident
                |-- incpkg
                |-- lck
                |-- metadata
                |-- stage
                |-- sweep
                `-- trace


    33 directories


    现在一目了然,包括ASM、CRS等组件日志都被ADR囊括其中。

    对于FRA,通过V$FLASH_RECOVERY_AREA_USAGE视图,Oracle可以知道闪回区的使用情况.
    现在对于ADR,Oracle可以通过一个新的视图v$diag_info来查询自动诊断库的信息:

    SQL> select * from v$diag_info;


       INST_ID NAME                      VALUE
    ---------- ------------------------- ------------------------------------------------------------
             1 Diag Enabled              TRUE
             1 ADR Base                  /opt/oracle
             1 ADR Home                  /opt/oracle/diag/rdbms/eygle/eygle
             1 Diag Trace                /opt/oracle/diag/rdbms/eygle/eygle/trace
             1 Diag Alert                /opt/oracle/diag/rdbms/eygle/eygle/alert
             1 Diag Incident             /opt/oracle/diag/rdbms/eygle/eygle/incident
             1 Diag Cdump                /opt/oracle/diag/rdbms/eygle/eygle/cdump
             1 Health Monitor            /opt/oracle/diag/rdbms/eygle/eygle/hm
             1 Default Trace File        /opt/oracle/diag/rdbms/eygle/eygle/trace/eygle_ora_10858.trc
             1 Active Problem Count      0
             1 Active Incident Count     0


    11 rows selected.


    SQL> select table_name from dict where table_name like '%DIAG%';


    TABLE_NAME
    ------------------------------
    V$DIAG_INFO
    GV$DIAG_INFO

    ============================================================================================

    10.Consider the following scenario for your database: 
    -Backup optimization is enabled in RMAN. The recovery window is set to 7 days in RMAN. The most 
    recent backup to disk for the TOOLS tablespace was taken on November 3, 2007. 
    The TOOLS tablespace is read-only since November 4, 2007. 
    On November 23, 2007, you issue the RMAN command to back up the database to disk. Which statement 
    is true regarding the backup of the TOOLS tablespace? 
    A. The RMAN backup fails because the TOOLS tablespace is read-only 
    B. The RMAN skips the backup of the tablespace because backup optimization is enabled 
    C. The RMAN makes backup because optimization can be enabled only for backups to disk 
    D. The RMAN makes the backup because no backup of the tablespace exists within the seven day 
    window 
    Answer: D 
    解析: 
    Suppose that backup optimization is enabled, and a recovery window backup retention policy is in effect. In this case, when performing SBT backups RMAN always backs up datafiles whose most recent backup is older than the recovery window. For example, assume the following scenario:

    1. Today is February 21. 
    2. The recovery window is 7 days. 
    3. The most recent backup of tablespace tools to tape is January 3. 
    4. Tablespace tools is read-only. 
    On February 21, when you issue a command to back up tablespace tools to tape, RMAN backs it up even though it did not change after the January 3 backup (because it is read-only). RMAN makes the backup because no backup of the tablespace exists within the 7-day recovery window.

    This behavior enables the media manager to expire old tapes. Otherwise, the media manager would be forced to keep the January 3 backup of tablespace tools indefinitely. By making a more recent backup of tablespace tools on February 21, RMAN enables the media manager to expire the tape containing the January 3 backup.

    参考: 
    http://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmconfb.htm#BRADV89437

  • 相关阅读:
    常用head标签
    php自定义配置文件简单写法
    sublimeText常用插件
    addslashes,htmlspecialchars,htmlentities转换或者转义php特殊字符防止xss攻击以及sql注入
    服务器安装node全教程
    Sublime Text 3 Build 3176 License
    [转]Zend Studio 文件头和方法注释设置
    给php代码添加规范的注释phpDocumentor
    [转]php 在各种web服务器的运行模式
    .htaccess文件url重写小记
  • 原文地址:https://www.cnblogs.com/ericnie/p/5653672.html
Copyright © 2011-2022 走看看