Viewing the Alert Log
•The alert log file is a chronological log of messages about the database instance and database, such as:
–Any nondefault initialization parameters used at startup
–All internal errors (ORA-600), block corruption errors (ORA-1578), and deadlock errors (ORA-60) that occurred
–Administrative operations, such as the SQL statements CREATE, ALTER, DROPDATABASE, and TABLESPACE,and the Enterprise Manager or SQL*Plus statements STARTUP, SHUTDOWN, ARCHIVELOG, and RECOVER
–Several messages and errors relating to the functions of shared server and dispatcher processes
–Errors during the automatic refresh of a materialized view
•Query V$DIAG_INFOto find the location of the alert log.
–The path to alert_SID.logcorresponds to the Diag Trace entry.
–The path to log.xmlcorresponds to the Diag Alert entry.
•You can view the alert log in a text editor or in ADRCI.
Using Trace Files
•Trace files contain:
–Error information (contact Oracle Support Services if an internal error occurs)
–Information that can provide guidance for tuning applications or an instance
•Each server and background process can write to an associated trace file.
•Trace file names for background processes are named after their processes.
–Exception: Trace files generated by job queue processes
•Oracle Database includes an advanced fault diagnosability infrastructure for preventing, detecting, diagnosing, and resolving problems.
•When a critical error occurs:–An incident number is assigned to the error–Diagnostic data for the error (such as trace files) is immediately captured and tagged with the incident number–Data is stored in the ADR
•ADR files can be automatically purged by setting retention policy parameters.
Administering the DDL Log File
•Enable the capture of certain DDL statements to a DDL log file by setting ENABLE_DDL_LOGGINGto TRUE
•The DDL log contains one log record for each DDL statement.
•Two DDL logs contain the same information:
–XML DDL log: log.xmlwritten to $ORACLE_BASE/diag/rdbms///log/ddl
–Text DDL: ddl_.logwritten to $ORACLE_BASE/diag/rdbms///log
•Example:
$ more ddl_orcl.log
Thu Nov 15 08:35:47 2016
diag_adl:drop user app_user