Friday, October 10, 2014

Oracle 11g Admin R2 - Chapter 09 Managing Diagnostic Data


- Problem is a critical error in a database instance, Oracle Automatic Storage Management (Oracle ASM) instance, or other Oracle product or component. Critical errors manifest as internal errors, such as ORA-00600, or other severe errors, such as ORA-07445


- Incident is a single occurrence of a problem. When a problem (critical error) occurs multiple times, an incident is created for each occurrence. Incidents are timestamped and tracked in the Automatic Diagnostic Repository (ADR)


- Flood-controlled incident is an incident that generates an alert log entry, is recorded in the ADR, but does not generate incident dumps. Flood-controlled incidents provide a way of informing you that a critical error is ongoing, without overloading the system with diagnostic data, database writes a message to the alert log indicating that no further incidents will be recorded:
  1. After five incidents occur for the same problem key in one hour
  2. After 25 incidents occur for the same problem key in one day
  3. After 50 incidents for the same problem key occur in one hour
  4. After 250 incidents for the same problem key occur in one day
- Automatic Diagnostic Repository (ADR) file-based repository for database diagnostic data such as traces, dumps, the alert log, health monitor reports, and more. ADR home is given by the following path, which starts at the ADR base directory:

        diag/product_type/product_id/instance_id
        ADR_base/diag/rdbms/orcl/orcl/
        ADR_base/diag/asm/+asm/+asm/


, ADR in RAC:
- each node can have ADR base on its own local storage, or ADR base can be set to a location on shared storage
- you can use ADRCI utility to view aggregated diagnostic data from all instances on a single report.


- Alert log is an XML file that is a chronological log of database messages and errors such as starting up or shutting down the database, recovering the database, creating or dropping a tablespace, and others.


- Trace Files updated periodically over the life of the process and can contain information on the process environment, status, activities, and errors with file extension is .trc and sometimes trace map (.trm) files.


- Dump Files is a specific type of trace file. A dump is typically a one-time output of diagnostic data in response to an event (such as an incident)


- Core File contains a memory dump, in an all-binary, port-specific format. Core file names include the string "core" and the operating system process ID. Core files are useful to Oracle Support engineers only.

- Viewing ADR Locations with the V$DIAG_INFO View
  

SQL> col name format a35
SQL> col value format a65
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/oracle/diag/rdbms/orcl/orcl
         1|Diag Trace                         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace
         1|Diag Alert                         |/u01/app/oracle/diag/rdbms/orcl/orcl/alert
         1|Diag Incident                      |/u01/app/oracle/diag/rdbms/orcl/orcl/incident
         1|Diag Cdump                         |/u01/app/oracle/diag/rdbms/orcl/orcl/cdump
         1|Health Monitor                     |/u01/app/oracle/diag/rdbms/orcl/orcl/hm
         1|Default Trace File                 |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_14866.trc
         1|Active Problem Count               |0
         1|Active Incident Count              |0

11 rows selected.

- Viewing Critical Errors with the V$DIAG_CRITICAL_ERROR View
  
SQL> select * from v$diag_critical_error;
FACILITY  |ERROR
----------|-----------------------------------------------------------------
ORA       |7445
ORA       |4030
ORA       |4031
ORA       |29740
ORA       |255
ORA       |355
ORA       |356
ORA       |239
ORA       |240
ORA       |494
ORA       |3137
ORA       |227
ORA       |353
ORA       |1578
ORA       |32701
ORA       |32703
ORA       |29770
ORA       |29771
ORA       |445
ORA       |25319
ORA       |56729
OCI       |3106
OCI       |3113
OCI       |3135

24 rows selected.


- Investigating, Reporting, and Resolving a Problem

  • Task 1: View Critical Error Alerts in Enterprise Manager
  • Task 2: View Problem Details
  • Task 3: (Optional) Gather Additional Diagnostic Information
  • Task 4: (Optional) Create a Service Request
  • Task 5: Package and Upload Diagnostic Data to Oracle Support
  • Task 6: Track the Service Request and Implement Any Repairs
  • Task 7: Close Incidents
-
- Viewing the Alert Log a. Enterprise Manager > Home Page > Alert Log Contents b. SQL Plus
    SQL> select * from v$diag_info;

- To find the trace file for your current session:
    SQL> select value from v$diag_info where name = 'Default Trace File';
    VALUE
    -----------------------------------------------------------------
    /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_3605.trc

- To find all trace files for the current instance:
    SQL> select value from v$diag_info where name = 'Diag Trace';
    VALUE
    -----------------------------------------------------------------
    /u01/app/oracle/diag/rdbms/orcl/orcl/trace
    

- To determine the trace file for each Oracle Database process:
SQL> col program format a40
SQL> col tracefile format a65
SQL> select pid, program, tracefile from v$process;
       PID|PROGRAM                                 |TRACEFILE
----------|----------------------------------------|-----------------------------------------------------------------
         1|PSEUDO                                  |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_0.trc
         2|oracle@demo1.localdomain (PMON)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_pmon_32236.trc
         3|oracle@demo1.localdomain (PSP0)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_psp0_32238.trc
         4|oracle@demo1.localdomain (VKTM)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_vktm_32240.trc
         5|oracle@demo1.localdomain (GEN0)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_gen0_32244.trc
         6|oracle@demo1.localdomain (DIAG)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_diag_32246.trc
         7|oracle@demo1.localdomain (DBRM)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbrm_32248.trc
         8|oracle@demo1.localdomain (DIA0)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dia0_32250.trc
         9|oracle@demo1.localdomain (MMAN)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_mman_32252.trc
        10|oracle@demo1.localdomain (DBW0)         |/u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_32254.trc


- ADRCI SHOW TRACEFILE command
$ adrci
adrci> show tracefile
     diag/tnslsnr/demo1/listener/trace/listener.log
     diag/rdbms/orcl/orcl/trace/orcl_vktm_25376.trc
     diag/rdbms/orcl/orcl/trace/orcl_cjq0_25525.trc
     diag/rdbms/orcl/orcl/trace/orcl_arc0_19281.trc




No comments:

Post a Comment