Where are Oracle database alert logs stored?

If you want to look in the alert log, but don’t remember/know where it is.

Query the database

If you can query the database, you can use the V$DIAG_INFO view as described in the Oracle Database Administrator’s Guide:

  • Connect to the database with SQL*Plus or another query tool, such as SQL Developer.
  • View the locations with the V$DIAG_INFO view.
    The text-only alert log is found at the Diag Trace location and is called alert_SID.log.
    The xml alert log is called log.xml and is found at the Diag Alert location.
SELECT * FROM V$DIAG_INFO;
INST_ID NAME                  VALUE
------- --------------------- ---------------------------------------
1       Diag Enabled          TRUE
1       ADR Base              /u01/oracle
1       ADR Home              /u01/oracle/diag/rdbms/orclbi/orclbi
1       Diag Trace            /u01/oracle/diag/rdbms/orclbi/orclbi/trace
1       Diag Alert            /u01/oracle/diag/rdbms/orclbi/orclbi/alert
1       Diag Incident         /u01/oracle/diag/rdbms/orclbi/orclbi/incident
1       Diag Cdump            /u01/oracle/diag/rdbms/orclbi/orclbi/cdump
1       Health Monitor        /u01/oracle/diag/rdbms/orclbi/orclbi/hm
1       Default Trace File    /u01/oracle/diag/rdbms/orclbi/orclbi/trace/orcl_ora_22769.trc
1       Active Problem Count  8
1       Active Incident Count 20

Use find

If you can’t query the database, you can search for the alert_SID.log or log.xml files using find. If you have $ORACLE_BASE set, start searching there. Otherwise start at /u01/app/oracle (unless you have it installed somewhere else of course). Examples:

find $ORACLE_BASE -name alert_*.log
find /u01/app/oracle -name log.xml

The documentation

This is described in the Oracle Database Administrator’s Guide in the Managing Diagnostic Data chapter. Documentation for all releases found here:

https://docs.oracle.com/en/database/oracle/oracle-database/index.html

Comments are closed.