11gOCP精解 之 02

jhon_lee發表於2012-09-22
Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE

Examine the following values of the initialization parameters in the database having the SID ORCL:

BACKGROUND_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/bdump

USER_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/udump

CORE_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/cdump

DIAGNOSTIC_DEST=

The environment variables have the following value:

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

What is the location of the Automatic Diagnostic Repository (ADR) home?

A. /u01/app/oracle/product/11.1.0/db_1

B. /u01/app/oracle

C. $ORACLE_HOME/bdump

D. $ORACLE_HOME/log

Answer: B

Explanation:

Oracle Database 11gFDI)是自動化診斷方面的又一增強。FDI的一個關鍵元件是自動診斷庫Automatic Diagnostic Repository-ADR)。

Oracle Database 11g之前,Oracle的各類跟蹤檔案、日誌檔案等診斷檔案的儲存位置並不統一,現在在FDI的基礎架構之上,Oracle開始統一規劃這些檔案的儲存,ADR之於診斷檔案,就類似於OFAOptimal Flexible Architecture )之於資料庫檔案,FRA)之於備份檔案。

ADR的路徑被稱為ADR BASE,這個位置由一個新的初始化引數DIAGNOSTIC_DEST決定。

 

SQL> show parameter DIAGNOSTIC_DEST;

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ----------------------------------------------

diagnostic_dest                      string      /u01/app/oracle

 

這個引數的預設值和環境變數ORACLE_BASE有關:

如果設定了 ORACLE_BASE DIAGNOSTIC_DEST = ORACLE_BASE 

如果未設定 ORACLE_BASE ,則 DIAGNOSTIC_DEST = ORACLE_HOME/log

 

檢視diag目錄結構

[oracle@oel11g oracle]$ tree -d diag/

diag/

|-- rdbms

|   `-- oracle11g

|       `-- oracle11g

|           |-- alert

|           |-- cdump

|           |-- hm

|           |-- incident

|           |-- incpkg

|           |-- ir

|           |-- lck

|           |-- metadata

|           |-- stage

|           |-- sweep

|           `-- trace

`-- tnslsnr

    |-- oel11g

    |   `-- listener

    |       |-- alert

    |       |-- cdump

    |       |-- incident

    |       |-- incpkg

    |       |-- lck

    |       |-- metadata

    |       |-- stage

    |       |-- sweep

    |       `-- trace

    `-- oel_11g

        `-- listener

            |-- alert

            |-- cdump

            |-- incident

            |-- incpkg

            |-- lck

            |-- metadata

            |-- stage

            |-- sweep

            `-- trace

一目瞭然,包括ASMCRS等元件日誌都被ADR囊括其中

 

Oracle可以透過一個新的檢視v$diag_info來查詢自動診斷庫的資訊:

SQL> select * from v$diag_info

   INST_ID NAME                           VALUE

---------- ------------------------------ ------------------------------

         1 Diag Enabled                   TRUE

         1 ADR Base                       /u01/app/oracle

         1 ADR Home                      /u01/app/oacle/diag/rdbms/oracle11g/

                                         oracle11g

 

         1 Diag Trace                     /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/trace

         1 Diag Alert                     /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/alert

         1 Diag Incident                  /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/incident

         1 Diag Cdump                     /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/cdump

         1 Health Monitor                 /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/hm

         1 Default Trace File             /u01/app/oracle/diag/rdbms/oracle11g/

                                          oracle11g/trace/oracle11g_ora_

                                          26773.trc

 

         1 Active Problem Count           0

         1 Active Incident Count          0

 

11 rows selected.

所以選擇B


                                                                                                                Thanks
                                                                                                               Onepice
                                                                                                                 2012-09-22

相關文章