Combining multiple trace files into single file using trcsesse
Posted by decipherinfosys on June 24, 2009
We are all aware that tkprof and trace facility are two most basic and important aspects of performance tuning in oracle database. We can generate trace for the entire database or for a specific session. We have covered about them in our previous blog post – here. We have also covered event level tracing here.
Problem occurs when tracing spans across multiple trace files. How we can collect data from multiple trace files? Oracle provides the utility called ‘trcsess’, which can combine multiple trace files into single trace file. Once all the files are combined into one file, we can run tkprof or trace analyzer on the file to collect more meaningful data. Basic syntax for trcsess utility is as follows.
Trcsess utility provides different criteria on which we can combine information from all the trace files into single trace file. Following is the basic syntax for trcsess utility.
Output specifies the output file name and rest of them are criteria on which one can combine the different trace files into single trace file. We can combine multiple trace files based on either session or client id or service (instance name) or specific action or module name. All these information will be available in trace file itself. After that we have to specify all the trace files we would like to combine. So here is the example of it.
trcsess output=ora_jun23_lvl12.trc service=ORCL orcl_ora_1024490_TEST.trc orcl_ora_1024492_TEST.trc
In our example, we are combining two trace files based on the service and combined output is created in ora_jun23_lvl12.trc file. As mentioned earlier, we can run tkprof output on this single file to get all the information for the traced session.
- Oracle 10g Performance Tuning guide – here