Application Engine - Part 3 - Tracing and TraceMagic


In this article we will discuss tracing Application Engine with an example. We will also see a utility called TraceMagic to interpret the trace results in a neat manner.

This part of the Application Engine article is in continuation for Part-I in the series of Application Engine articles posted on my blog.

The example has been created and tested in Peoplesoft environment with DEMO database.

In this example, we will use the Application Engine AJ_AE_SAMPLE that we developed in Part-I. The major steps involved will be
1) Make configuration setup for Application Engine Tracing.
2) Start Application Engine on Windows workstation.
3) Open trace file in text editor.
4) Open trace file using TraceMagic utility.


To run an Application Engine program with Tracing ON, Start PeopleSoft Configuration Manager, Select Trace tab.
Please check the boxes and specify the trace file. I have specified trace file as c:\temp\TRACE.TRC as shown below.


Open the Application Engine program AJ_COPY_JRNL in Application Designer (AJ_COPY_JRNL was developed in Part 1).


Click Edit, Run Request to execute the Application Engine program. Please specify run control as TEST1 and leave the two check boxes unchecked.


The Application Engine starts executing.


Once the Application Engine program has completed successfully, you may open the trace file in a text editor. The file will look like this.



TraceMagic utility
There is one utility called TraceMagic which can read the above trace file and present those trace results in much efficient form. This TraceMagic utility is available from Oracle support site. Please logon on to Oracle Support site and search for Doc ID 1470578.1 for the latest version and documentation on TraceMagic.

Download the TraceMagic zip file and install on your Windows workstation. Please note that it requires Microsoft .Net Framework 4 or later.

Start TraceMagic program. Open the trace file c:\temp\TRACE.TRC we just created. Once the files is read by TraceMagic, the trace results will be presented in three main tabs (1) Statistics (2) Execution Path (3) SQL Statements. The three main tabs have further sub-tabs. The following screen shots show the various tabs and sub-tabs showing the trace results for the Application Engine we executed.


 
 
 
 
 
 
 
 
 
 
 

 


If you are comfortable at this stage with Application Engine tracing, it is time now to trace when Application Engine runs at Command Line or through Process Scheduler.

When you want to trace Application Engine while executing at Command Line, you need to specify -TRACE nnnnn option. That nnnnn is determined using the summation of the values related to what you want to trace, from the following table.

ValueDescription
0Disables tracing.
1Initiates the Application Engine step trace.
2Initiates the Application Engine SQL trace.
4Initiates the trace for dedicated temporary table allocation to an Application Engine trace (AET) file. You can trace how the system allocates, locks, and releases temporary tables during program runs.
128Initiates the statement timings trace to a file, which is similar to the COBOL timings trace to a file.
256Initiates the PeopleCode detail to the file for the timings trace.
1024Initiates the statement timings trace and stores the results in the following tables: PS_BAT_TIMINGS_LOG and PS_BAT_TIMINGS_DTL.
2048Requests a database optimizer trace file.
4096Requests a database optimizer to be inserted in the Explain Plan table of the current database.
8192Sets a trace for PeopleSoft Integration Broker transform programs.
16384Initiates a SQL timings trace and stores the results in the following tables: PS_AE_TIMINGS_LG and PS_AE_TIMINGS_DT.


The most common trace option used is -TRACE 131
where 131 = 1 + 2 + 128 is indicating that you want to trace activities related to options with values 1, 2 and 128.

That is it in this article for now.

Enjoy tracing Application Engines and TraceMagic.
 
 

Comments