R12.2 Apps DBA. Powered by Blogger.

How To Trace a Concurrent Request And Generate TKPROF File 12.2

No comments :
(Doc ID 453527.1)
1. Generate Trace File
Enable Tracing For The Concurrent Manager  Program
Select the Enable Trace Checkbox
Turn On Tracing
    Responsibility: System Administrator
    Navigate: Profiles > System
    Query Profile Option Concurrent: Allow Debugging
    Set profile to Yes
Run Concurrent Program With Tracing Turned On
    Logon to the Responsibility that runs the Concurrent Program
    In the Submit Request Screen click on Debug Options (B)
    Select the Checkbox for SQL Trace
Query to find the Concurrent Request Trace File Path.
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', 'Runnin')
       || '-'
       || 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_ID
   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.application_id = execname.application_id
   AND prog.executable_id = execname.executable_id;
$ tkprof <filename.trc> <output_filename> sys=no explain=apps/<password> sort='(prsela,exeela,fchela)' print=10
Note : On Database versions prior to 11g use the following query to identify the directory where the raw trace file is saved.
select value from v$parameter where name = 'user_dump_dest';
On database version 11g use the following query:
select value from v$diag_info where name = 'Diag Trace';
4. Debug based on fnd_log_messages
If you need to debug further to get the detailed error messages raised from the program.
To do this ask the customer to execute the following steps,
 1) Log into system admin responsibility and set the following profile options:
 FND: Debug Log Enabled - Yes
 FND: Debug Log Level - Statement
 FND: Debug Log Module - %
 FND: Message Level Threshold to low level
 [ set at user level ]
  2) Run the below select in sqlplus:
 SELECT MAX(log_sequence) FROM fnd_log_messages;
 Take the max of log sequence and use it as log_seq1 in step#5
 3) Try to reproduce the issue with above user for which fnd profile options are set.
 4) Run the below select in sqlplus:
  SELECT MAX(log_sequence) FROM fnd_log_messages;
 Take the max of log sequence and use it as log_seq2 in step #5.
  5) Run following select to get the log messages:
 SELECT LOG_SEQUENCE, MESSAGE_TEXT, USER_ID FROM fnd_log_messages WHERE
 log_sequence > log_seq1-1 and log_sequence < log_seq2+1 ;

No comments :

Post a Comment

Note: only a member of this blog may post a comment.