Lesson 4 | Oracle tracing parameters |
Objective | Describe functions of the Oracle trace parameters. |
trace_directory_client sqlnet.ora
parameter. If
you have set the trace_unique_client
parameters in your sqlnet.ora file, you will have a sqlnet_nnn_.trc
file
(where nnn is the thread number). $ORACLE_HOME/network/log.
Here you will see the listener.trc
file for listener traces, cman_PID.trc
for connection manager traces, names_nnn_.trc
files (where nnn is the thread number) for Oracle Names traces, and general server traces as SVR_PID.trc. c:\orant\network\admin\sqlnet.ora
). To change client trace parameters, you must change our local sqlnet.ora file,
exit the client application and then re-start the client application. If the same client application establishes some more Network Services connections, the sqlnet.ora is not re-read and any changes that were made to the sqlnet.ora file after the first Net8 connection will not be used.
SQL > show parameters dump NAME TYPE VALUE ----------------------------------- ------- ------------------------------ background_core_dump string full background_dump_dest string ?/rdbms/log core_dump_dest string ?/dbs max_dump_file_size string 10240 shadow_core_dump string full user_dump_dest string ?/rdbms/log
dilbert>cd $ORACLE_HOME/rdbms/log dilbert> ls alert_fred.log reco_34326.trc smon_57560.trc snp1_54580.trc ora_58718.trc dbwr_38406.trc lgwr_36106.trc pmon_52070.trc
dest
tell us where the files are located. In the example above you see that the
background_dump_dest
and the user_dump_dest
are both set to $ORACLE_HOME/rdbms/log.
If you go to this directory, you will find a host of different alert and trace files:background_dump_dest
directory. Here you see the main log for the
fred
database, called alert_fred.log.
The alert log will contain all relevant Oracle messages, including startup and shutdown messages, as well as redo log switches and serious errors.
pmon
), the Recoverer process (reco
), the log writer (lgwr
), the database writer (dbwr
), and the system monitor process (smon
). Generic Oracle trace files are always prefixed with ora and end with "trc".
listener.ora Parameter | OEM Cloud Control/Net Manager Field | Description |
TRACE_LEVEL_listener_name | Select a trace level/Trace Level | The level of detail the trace facility records for the listener. The trace level value can either be a value within the range of 0 (zero) to 16 where 0 is no tracing and 16 represents the maximum amount of tracing or one of the following values:
|
TRACE_DIRECTORY_listener_name TRACE_FILE_listener_name |
Trace File | The destination directory and file for the trace file. By default, the directory is ORACLE_HOME/network/trace, and the file name is listener.trc |
TRACE_FILEAGE_listener_name | You must set this parameter manually. | The maximum age of listener trace files in minutes. When the age limit is reached, the trace information is written to the next file. The number of files is specified with the TRACE_FILENO_listener_name parameter. |
TRACE_FILEAGE_SERVER | You must set this parameter manually. | Specifies the maximum age of server trace files in minutes. When the age limit is reached, the trace information is written to the next file. The number of files is specified with the TRACE_FILENO_SERVER parameter. |
TRACE_FILELEN_listener_name | You must set this parameter manually. | The size of the listener trace files in KB. When the size is reached, the trace information is written to the next file. The number of files is specified with the TRACE_FILENO_listener_name parameter |
TRACE_FILENO_listener_name | You must set this parameter manually. | The number of trace files for listener tracing.
When this parameter is set along with the TRACE_FILELEN_listener_name parameter, trace files are used in a cyclical fashion. The first file is filled, then the second file, and so on. When the last file has been filled, the first file is re-used, and so on. The trace file names are distinguished from one another by their sequence number. For example, if the default trace file of listener.trc is used, and this parameter is set to 3, then the trace files would be named listener1.trc, listener2.trc and listener3.trc. In addition, trace events in the trace files are preceded by the sequence number of the file. When this parameter is set with the TRACE_FILEAGE_listener_name parameter, trace files are cycled based on the age of the trace file. The first file is used until the age limit is reached, then the second file is use, etc.. When the last file's age limit is reached, the first file is re-used. When this parameter is set with both the TRACE_FILELEN_listener_name and TRACE_FILEAGE_listener_name parameters, trace files are cycled when either the size limit or the age limit is reached. |
TRACE_TIMESTAMP_listener_name | You must set this parameter manually. | A time stamp in the form of dd-mon-yyyy hh:mi:ss:mil for every trace event in the listener trace file. |