Sunday, May 5, 2013

How to take trace for Concurrent Program ?

1. Enable Trace at the Report Definition.
    Go to System Administrator -> Concurrent Programs -> Define , Query the report and check the 'Enable trace' check box

( Navigate to:
  Query on the Profile Option: "Concurrent: Allow Debugging"

  This should be set to 'yes' at 'Site' level.

  If it isn't set, then set it, then logout and bounce the APPS services.

  The 'Debug Options' button on the concurrent program will now be enabled. )

2. Run the report for Step 1. above

3. Get the request id from below query. i.e. Request id = 555555

select fcr.request_id "Request ID"
--, fcr.oracle_process_id "Trace ID"
, p1.value||'/'||lower(p2.value)||'_ora_'||fcr.oracle_process_id||'.trc' "Trace File"
, to_char(fcr.actual_completion_date, 'dd-mon-yyyy hh24:mi:ss') "Completed"
, fcp.user_concurrent_program_name "Program"
, fe.execution_file_name|| fe.subroutine_name "Program File"
, decode(fcr.phase_code,'R','Running')||'-'||decode(fcr.status_code,'R','Normal') "Status"
, fcr.enable_trace "Trace Flag"
from fnd_concurrent_requests fcr
, v$parameter p1
, v$parameter p2
, fnd_concurrent_programs_vl fcp
, fnd_executables fe
and fcr.concurrent_program_id = fcp.concurrent_program_id
and fcr.program_application_id = fcp.application_id
and fcp.application_id = fe.application_id
and fcp.executable_id=fe.executable_id
and ((fcr.request_id = &request_id
or fcr.actual_completion_date > trunc(sysdate)))
order by decode(fcr.request_id, &request_id, 1, 2), fcr.actual_completion_date desc;

--you will be prompted to enter the request_id;

4. In SQL: select value from v$parameter where name = 'user_dump_dest'

5. Go to directory in Step 4. above.

6. grep ‘555555’ *.trc

7. Find the file name from step 6. above

8. Upload the raw trace file from step 4. above , and the tkprofed trace as well.

$ tkprof <RAW TRACE> <output> explain=apps_uname/apps_pwd sys=no  sort=prsela,exeela,fchela

No comments:

Post a Comment