Trace Files   «Prev  Next»
Lesson 3Identify the location of background and user process trace files
Objective Find the location of trace files on any Oracle database.

Finding the trace files log

To find the location of a trace file, you will use the same method you did to find the alert log in the last module. The location of the trace files is specified in your Oracle initialization file called init.ora. As you learned in the last module, the Oracle software will go to the $ORACLE_HOME/dbs directory to find the initialization files for all databases on a server. The init.ora files are generally called init$SID.ora. For example, a database called PRODUCT would have an init.ora file called $ORACLE_HOME/dbs/initPRODUCT.ora.
Like alert files, the trace files for background processes are written to the destination specified by the init.ora parameter background_dump_dest. All trace files for server processes are written to the destination specified by the init.ora parameter user_dump_dest.

Look for background_dump_dest

Inside the init.ora file (or the config.ora file) you can find the location of the trace file by looking for the variable called background_dump_dest. The methods you can use for finding the trace files on an unfamiliar server are the same that you just learned for finding an alert log: There are two methods for doing this:
  1. Use Oracle's server manager
  2. Use the UNIX grep utility

The following simulation will take you through the same two methods you followed in the last module to find an alert log. This time, you will locate the trace file and you will be asked to remember some of the steps without getting specific instructions.

Limiting the size of all Trace Files

This limit is set as the number of operating system blocks that can be used to hold each trace file. Of course, setting this value too low may result in the loss of valuable information. Oracle silently restricts the maximum value for this parameter to approximately 4,000,000 physical blocks. If the user exceeds this value, then MAX_DUMP_FILE_SIZE is set to 4,000,000 physical blocks, which is the maximum Oracle can provide. Note that this does not pertain to the alert file. You can control the size of all trace logs except the alert.log.
For example, if your logical file system block size is 512 bytes and you do not want to exceed 5 MB for the trace file size, you would set the MAX_DUMP_FILE_SIZE to 10,000.
Answer File 1
1) Answer File 1
Answer File 2
2) Answer File 2
Answer File 3
3) Answer File 3
Answer File 4
4) Answer File 4
Answer File 5
5) Answer File 5
Answer File 6
6) Answer File 6
Answer File 7
7) Answer File 7
Answer File 8
8) Answer File 8
Answer File 9
9) Answer File 9
  1. Enter the server manager.
  2. Prompt,
  3. svrmgrl
  4. (S0)Please type (S7)svrmgrl(S0) at the prompt and hit Enter.
  5. Connect to the server manager.
  6. Prompt,
  7. connect internal
  8. (S0)Please type (S7)connect internal(S0) at the prompt an hit Enter.

Finding a trace file

  1. Enter the server manager.
  2. Connect to the server manager.
  3. Do you remember how to display the background_dump_dest?
  4. Notice that the background_dump_dest is in the $ORACLE_BASE/admin/mon1/bdump directory and the user_dump_dest is in the $ORACLE_BASE/admin/mon1/udump directory. Now, here's a second way to find the trace file. Click anywhere to continue.
  5. Remember, 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. Do you remember how to use the grep utility 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 trace files. Click anywhere to continue.
  8. To finish the simulation, go to the correct directory and locate the trace files.
  9. Notice that there are two trace files. One is called reco_18150_mon1.trc and one is called smon_38878?mon1.trc.
You can control the maximum size of all trace files by setting the init.ora parameter max_dump_filesize. Now that you can locate trace files, you will learn how to interpret the information they contain in order to diagnose problems.