Lesson 3 | Identify 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:
- Use Oracle's server manager
- 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.
1) Answer File 1
2) Answer File 2
3) Answer File 3
4) Answer File 4
5) Answer File 5
6) Answer File 6
7) Answer File 7
8) Answer File 8
9) Answer File 9
❮
❯
- Enter the server manager.
- Prompt,
- svrmgrl
- (S0)Please type (S7)svrmgrl(S0) at the prompt and hit Enter.
- Connect to the server manager.
- Prompt,
- connect internal
- (S0)Please type (S7)connect internal(S0) at the prompt an hit Enter.
Finding a trace file
- Enter the server manager.
- Connect to the server manager.
- Do you remember how to display the background_dump_dest?
- 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.
- 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.
- Do you remember how to use the grep utility to look for background_dump_dest in *.ora?
- 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.
- To finish the simulation, go to the correct directory and locate the trace files.
- 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.