Notes
Outline
Oracle Alert and Trace Files
Objectives
After completing this lesson, you should be able to
do the following:
Describe the location and usefulness of the Alert log file
Describe the location and usefulness of the background and user process trace files
Diagnostic Information
Trace files:
Alert log file
Background process trace files
User trace files
Alert Log File
The Alert log file consists of a chronological log of messages and errors.
Check the Alert log file regularly to:
Detect internal errors (ORA-600) and block corruption errors
Monitor database operations
View the nondefault initialization parameters
Remove or trim the Alert log file regularly after checking.
Controlling the Alert Log File
Background Processes Trace Files
The Oracle server dumps information about errors detected by any background process in trace files.
Oracle support uses these trace files to diagnose and troubleshoot problems.
Controlling the Background Processes Trace Files
User Trace Files
Server process tracing is enabled or disabled at the session or instance level by:
The ALTER SESSION command
The SET_SQL_TRACE_IN_SESSION procedure
The initialization parameter SQL_TRACE
A user trace file contains statistics for traced SQL statements for that session.
A user trace file is useful for SQL tuning.
The Oracle database creates user trace files on a per-server-process basis.
Controlling the User Trace Files
Summary
In this lesson, you should have learned how to:
Set, retrieve, and use the Alert log file
Use background processes trace files
Trace user SQL statements