Alert Log   «Prev  Next»
Lesson 2Identify the location of the alert log
Objective Find the alert log on any Oracle server.

Finding the Alert Log

The location of the alert log is specified in your Oracle initialization file called init.ora. The Oracle software will go to the
$ORACLE_HOME/dbs directory
to find the initialization files for all databases on a server. And the init.ora files are generally called init$SID.ora. For example, a database called CUSTOMER would have an init.ora file called $ORACLE_HOME/dbs/initCUSTOMER.ora.

Look for background_dump_dest

Inside the init.ora file (or the config.ora file) you can find the location of the alert log by looking for the variable called background_dump_dest.

Another location for the alert log

There is a chance that the bdump parameter in the init.ora is not defined, in which case the alert log will be located at ORACLE_HOME/rdbms/log. This is the default and is overridden by specifying bdump. So, how do you quickly find the alert log on an Oracle server that you have never been onto before?
There are two methods for doing this:
  1. Use Oracle's server manager
  2. Use the UNIX grep utility

The following simulation will walk you through each method.
  1. The first method to find an alert log is to use Oracle's server manager. First, use the |||(S7)svrmgrl|||(S0) command to enter the server manager.
  2. Prompt
  3. svrmgr
  4. (S0)Please type svrmgrl at the prompt and hit Enter.
  5. Now type connect internal at the SVRMGR prompt and hit Enter.
  6. Prompt
  7. connect internal
  8. Please type |||(S7)connect internal|||(S0) at the prompt and hit Enter.
  9. You are now connected to the server manager. Issue the |||(S7)show parameters dump|||(S0) command and hit Enter.
  1. Prompt
  2. show parameters dump
  3. Please type |||(S7)show parameters|||(S0) dump at the prompt and hit Enter to continue.
  4. Here we see that the background_dump_dest is in the $ORACLE_BASE/admin/mon1/bdump directory. Now, here's a second way to find the alert log. Click anywhere to continue.
  5. Anywhere
  1. Another way to quickly see the location of the alert file without entering the server manager is to log on to the UNIX server and go to the
    $ORACLE_HOME/dbs 
    
    directory. Type cd $ORACLE_HOME/dbs at the prompt and hit Enter to continue.
  2. Prompt
  3. cd $ORACLE_HOME/dbs
  4. Please type |||(S7)cd $ORACLE_HOME/dbs|||(S0) at the prompt and hit Enter.

Finding the alert log

  1. The first method to find an alert log is to use Oracle's server manager. First, use the svrmgrl command to enter the server manager.
  2. Now type connect internal at the SVRMGR prompt and hit Enter.
  3. You are now connected to the server manager. Issue the show parameters dump command and hit Enter.
  4. Here we see that the background_dump_dest is in the $ORACLE_BASE/admin/mon1/bdump directory. Now, here's a second way to find the alert log. Click anywhere to continue.
  5. Another way to quickly see the location of the alert file without entering the server manager is to log on to the UNIX server and go to the $ORACLE_HOME/dbs directory. Type cd $ORACLE_HOME/dbs at the prompt and hit Enter to continue.
  6. To get the information you need from the init.ora file, use the UNIX utility grep (generalized regular expression parser). Type grep -i background *.ora to look for background_dump_dest in *.ora.
  7. Here we see that the background_dump_dest is in our config.ora file. Using either method, we can now go to that directory and locate the alert log file. Click anywhere to try it.
  8. Type the name of the directory where you just learned the alert file resides. Remember, both methods led you to the $ORACLE_BASE/admin/mon1/bdump directory.
  9. Notice that the alert log is called alert_mon1.log.
Now that we know where to find the alert log, let's see why it's important to know where to find the alert log.