Enable Trace for Concurrent Programs in Oracle Apps R12

Tracing the Concurrent program is very good option to Debug any issue while running the concurrent program.

Goal :
To enable the Trace for Concurrent Programs
To Debug the issues in Concurrent Programs or its dependent objects.

Solution :
1. Goto Concurrent Program Definition

Application Developer –> Concurrent –> Program –> check Enable Trace

Query your concurrent program and check the Enable Trace check box at the bottom of the screen.

2. Set the Profile Concurrent: Allow Debugging to YES.

3. Navigate to the Responsibility from where you are running the program.

4. Before Submitting the Concurrent Program in Submit Request screen there will be an option like Debug Options click on that button.

5. In the Debug Options select the SQL Trace and enable Trace with binds.

6. Submit the Concurrent Program and note down the Request id.

7.Trace file name will always be post fixed with oracle_process_id.To get the oracle_process_id use the below SQL
Select oracle_process_id from fnd_concurrent_requests where request_id= &Request_id;

8.And the Trace file path can be derived using the below SQL
Select * from v$parameter where name=’user_dump_dest’;

9. Get the trace file to your local machine.Understanding the raw trace is very complex so use TKPROF utility to make the Trace file readable.

10. Open the Command Prompt and run the below command
TKPROF < Trace File_Name.trc> <Output_File_Name.out> SORT=fchela

11.A new outfile will be generated with the name given in the above command.Analyse the Output file to know the answers for your problem.

Sql queries to find the log files by Request id
select req.oracle_process_id tracename, req.request_id, req.requested_by,usr.user_name, prog.user_concurrent_program_name, req.request_date, req.phase_code, req.status_code, req.logfile_name , req.outfile_name, dest.value as user_dump_dest from apps. fnd_concurrent_requests req, gv$parameter dest, apps.fnd_concurrent_programs_vl prog, apps.fnd_user usr
where  req. concurrent_program_id = prog.concurrent_program_id
and req.requested_by = usr.user_id
–and request_id like ‘6013239’
and dest.name= ‘user_dump_dest’
and request_id like & Request_id;
Sql query find the log files by username
select req.oracle_process_id tracename, req.request_id, req.requested_by,usr.user_name, prog.user_concurrent_program_name, req.request_date,  req.phase_code, req.status_code, req.logfile_name , req.outfile_name, dest.value as user_dump_dest 
from apps. fnd_concurrent_requests req, gv$parameter dest, apps.fnd_concurrent_programs_vl prog, apps.fnd_user usr
where  req. concurrent_program_id = prog.concurrent_program_id
and req.requested_by = usr.user_id
–and request_id like ‘6013239’
and dest.name= ‘user_dump_dest’
and usr.user_name like ‘Ramesh%G%’
order by request_date desc
Select oracle_process_id from fnd_concurrent_requests where request_id = &Request_id;
 
select * from apps. fnd_concurrent_requests req,gv$parameter dest , apps .fnd_concurrent_programs_vl prog where  req. concurrent_program_id = prog.concurrent_program_id and request_id like ‘601300%’
and dest.name= ‘user_dump_dest’
Advertisements

Enable Forms Diagnostics, Tracing in R12 using Profile Option

This document shows how to use Forms Runtime Diagnostics using Profile Option at user level.

  1. First verify if Forms using Socket or Servlet.
  • Login on to Application Server, and check the cfg file to verify the “serverURL=”And “connectMode=” settings.
  • In Servlet Mode:
    serverURL=/forms/lservlet
    connectionMode=servlet
  • In Socket Mode:
    serverURL=<blank>
    connectionMode=Socket

1.1

  1. Enable Forms Runtime Diagnostics (FRD)

FRD can be enabled in one of the following methods:

  • Option 1: Obtain FRD Trace Using Profile Options
  • Option 2: Obtain FRD Trace Using Appsweb.cfg
  • Option 3: Obtain FRD in an ADHOC way

We will be using method “Obtain FRD Trace Using Profile Options” in this example.

To start tracing, please modify Profile Option ‘ICX: Forms Launcher’ at USER level to include the Forms parameters required for FRD logging (Note: This should not set at SITE LEVEL)

2.1: Add the trace value “ ‘?record=collect’  “ to Apps URL for profile option ‘ICX: Forms Launcher’

In Servlet Mode:https://hostname.domain:port/forms/frmservlet?record=collect
in Socket Mode:https://hostname.domain:port/OA_HTML/frmservlet?record=collect

1.2

Copy the site level value for profile option ‘ICX: Forms Launcher’ and append values’?record=collect’. Past it at the user level.

Ex. Site Value: http://bpiebsprds.brakepartsinc.com:80/forms/frmservlet
Modified Value: http://bpiebsprds.brakepartsinc.com:80/forms/frmservlet?record=collect

Copy the modified value to the User level and Save.

1.5

  1. Login into Oracle Applications and launch forms via self-service. Navigate through the steps to capture trace.

Should get below prompt when you login to Form.

1.3

  1. Obtain the Trace File. It’s in $FORMS_TRACE_DIR, where<pid> is the process identifier.

Ex: $FORMS_TRACE_DIR/collect_6540

<Sample Output file>

1.4

Source:R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications (Doc ID 438652.1)