Monday, May 7, 2012

Oracle 11g ADR Location



Use the new initialization parameter diagnostic_dest to set the location of the ADR base.

SQL> show parameter diag


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest                      string      /u01/app/oracle


The diagnostic_dest parameter is optional, not mandatory,


If  diagnostic_dest parameter is not specified, Oracle will set up the parameter value in one of the following  way


1.  Oracle sets the diagnostic_dest parameter value to same as ORACLE_BASE environment variable, if set
2.  Oracle set the diagnostic_dest parameter value to $ORACLE_HOME/log, if ORACLE_BASE environment is not set

ADR base vs ADR Home

It’s important to distinguish between the ADR base, which is the common root directory for the ADR and an ADR home. ADR base is the location we set up with diagnostic_dest parameter.

An ADR home represents the path of the ADR home for the current database instance. Its important to note that ADR base can have multiple ADR homes, each of them serving as the root directory for a specific instance .

Each ADR home has the following path,

starting from the ADR base:

diag/product_type/product_id/instance_id

For example, for a database with the identical SID and database name of test2 and the ADR base being /u01/app/oracle, the ADR home would be the following:

/u01/app/oracle/diag/rdbms/test2/test2

Viewing the ADR Locations from SQLPLUS


SQL> select * from v$diag_info;



INST_ID  NAME            VALUE
------- --------------  ----------------------------------
1       Diag Enabled    TRUE
1       ADR Base        /u01/app/oracle
1       Diag Trace      /u01/app/oracle/diag/rdbms/test2/test2/trace


------
----


ADR Location in comparison to Old locations



Data                                                 Old location                                               ADR location
Core Dump                         CORE_DUMP_DEST                              $ADR_HOME/cdump
Alertlogdata                         BACKGROUND_DUMP_DEST             $ADR_HOME/trace
                                                                                                             $ADR_HOME/alert (XML)
Background process trace    BACKGROUND_DUMP_DEST             $ADR_HOME/trace
User process trace               USER_DUMP_DEST                                $ADR_HOME/trace

No comments:

Post a Comment