Databases Reference
In-Depth Information
Locating the Alert Log and Trace Files
In Oracle Database 11g and higher the default alert log directory path has this structure:
ORACLE_BASE/diag/rdbms/LOWER(<db_unique_name>)/<instance_name>/trace
Not You can override the default directory path for the alert log by setting the DIAGNOSTIC_DEST initialization
parameter.
Usually, the db_unique_name is the same as the instance_name . In RAC and Data Guard environments, however,
the db_unique_name is often different from the instance_name . You can verify the directory path with this query:
SQL> select value from v$diag_info where name = 'Diag Trace';
The name of the alert log follows this format:
alert_<ORACLE_SID>.log
You can also locate the alert log from the OS (whether or not the database is started) via these OS commands:
$ cd $ORACLE_BASE
$ find . -name alert_<ORACLE_SID>.log
In the prior find command, you'll need to replace the <ORACLE_SID> value with the name of your database.
Ti For oracle Database 10g the standard location for the alert log is defined as the
<ORACLE_BASE>/admin/<SID>/bdump directory. the easiest way to determine its location is via the following sQl
command: show parameter background_dump_dest
As shown in Chapter 3, it's advisable to set up an OS function that helps you navigate to the location of the alert
log. Here is such a function (you'll have to modify this to match your environment):
function bdump {
if [ "$ORACLE_SID" = "O12C" ]; then
cd /orahome/app/oracle/diag/rdbms/o12c/O12C/trace
elif [ "$ORACLE_SID" = "O11R2" ]; then
cd /orahome/app/oracle/diag/rdbms/o11r2/O11R2/trace
fi
}
You can now type bdump and will be placed in the working directory that contains the database alert log. Once you
have found the correct file, inspect the most recent entries for errors, and then look for trace files in the same directory:
$ ls -altr *.tr*
If any of these trace files are more than several days old, consider moving or removing them.
 
 
Search WWH ::




Custom Search