Tracing concurrent request and creating TKPROF
I) Generate Trace File
1) Enable Tracing for the Concurrent Program
a) select the ‘Enable Trace’ Checkbox
2) Turn on Tracing
a) Login as a user with ‘system administrator’ responsibility
b) Navigate: Profiles > System
c) Query Profile Option ‘Concurrent: Allow Debuggin’
d) Set profile to ‘YES’
3) Run Concurrent Program with Tracing Turnv On
a) Login as a user with the responsibility needed to run program with trace
b) In the Submit Request Screen click on the ‘Debug Options’
c) Select the checkbox for SQL Trace
II) Find the Trace File Name
1) Run the below sql to find the raw trace name and location
prompt
accept request prompt ‘Concurrent Request ID:’
prompt
column traceid format a8
column tracename format a80
column user_concurrent_program_name format a40
column execname format a15
column enable_trace format a12
set lines 80
set pages 22
set head off
SELECT ‘Request id: ‘||request_id ,
‘Trace id: ‘||oracle_Process_id,
‘Trace Flag: ‘||req.enable_trace,
‘Trace Name:
‘||dest.value||’/’||lower(dbnm.value)||’_ora_’||oracle_process_id||’.trc’,
‘Prog. Name: ‘||prog.user_concurrent_program_name,
‘File Name: ‘||execname.execution_file_name|| execname.subroutine_name ,
‘Status : ‘||decode(phase_code,’R’,’Running’)
||’-’||decode(status_code,’R’,’Normal’),
‘SID Serial: ‘||ses.sid||’,’|| ses.serial#,
‘Module : ‘||ses.module
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
and dest.name=’user_dump_dest’
and dbnm.name=’db_name’
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.executable_application_id = execname.application_id
and prog.executable_id=execname.executable_id;
III) Create the TKPROF Trace File
1) Format the TKPROF
a) tkprof rawtrace.trc output_file explain=apps/apps/sort=(exeela,fchela) sys=no
b) rawtrace.trc: Name of trace file
output_file: tkprof out file
explain: This option provides the explain plan for the sql statements
sort: This provides the sort criteria in which all sql statements will be sorted. This will bring the bad sql at the top of the outputfile.
sys=no: Disables sql statements issued by user SYS
For more information about Tracking with Oracle E-Business you can check out the following on the ‘My Oracle Support’ website.
NOTE:1121043.1 – Collecting Diagnostic Data for Performance Issues in Oracle E-Business Suite
NOTE:187504.1 – Concurrent Processing – bde_request.sql – Process and Session info for one Concurrent Request (11.5)
NOTE:399229.1 – How To Trace and Debug Oracle Self Service Web Applications For EBS CRM
