Various ways of enabling trace in E-business suite


Generating a Trace File for Forms

Navigate to Menu – Help > Diagnostics

Select one of the following options:
  • Regular
    Trace
  • Trace with
    Binds
  • Trace with
    Waits
  • Trace with
    Binds and Waits
      
Reproduce the performance issue.

– Disable the trace by selecting “No Trace”.

Generating a Trace File for a Concurrent Program

– Enable the trace option by selecting the Enable Trace Checkbox in the
concurrent program definition.




– Reproduce the performance issue.

– Disable the trace option by unchecking the Enable Trace Checkbox in the
concurrent program definition.



Note :  If it is a Custom report then there is a
mandatory XML tags which should be added by the developers. Without that the
above trace will not work.
Generating a
Trace File for Java Programs
– Navigation:
Responsibility = System
Administrator
Security > Profile
User: Enter User name of the user facing the issue.
Query the Profile: FND: Diagnostics
Set the FND : Diagnostics profile to Yes at User level.

– Login into Self Service
under the same user used to set the profile value.

– Navigate to the point immediately before the error is received, if any.

– Click the diagnostic icon at the top of the page.  Two options are
displayed:

  Show Log
  Set Trace Level

– Select ‘Set Trace Level’

– Click Go.

– A page with a set of options is displayed.


Disable Trace
Trace (regular)
Trace with binds
Trace with waits
Trace with binds and waits

– Choose Trace with binds and waits

– Click Save.

– Return back to the page and reproduce the error, if any.

– Turn off Trace.


Select the Diagnostic icon.
Click on option: Set Trace Level
Click Go
Select : Disable Trace
       Note the trace
id numbers – there will be more than one and exit the Application.

Using the SQL
Trace Option and TKPROF Utility
  1. Set initialization
    parameters for trace file management.
  2. Enable the SQL Trace
    facility for the desired session, and run the application.
  3. Run TKPROF to
    translate the trace file created in Step 2 into a readable output file.
    This step can optionally create a SQL script that can be used to store the
    statistics in a database.
  4. Interpret the output
    file created in Step 3.Formatting Trace File with TKPROF

Run TKPROF procedure on the raw trace files.  For example,
Doyen_ora_18190.trc is the name of the raw trace file and trace1.txt is the
name of the TKPROF file.
   
   
 tkprof Doyen_ora_18190.trc
output_file.txt explain=apps/<apps pw> 
sort=‘(prsela,exeela,fchela)



To enable
trace for an API when executed from a SQL script outside of Oracle Applications
For Example Inventory APIs

— enable trace
ALTER SESSION SET
EVENTS ‘10046 trace name context forever, level 12’;

— Set the trace
file identifier, to locate the file on the server
ALTER SESSION SET
TRACEFILE_IDENTIFIER = ‘API_TRACE’;

— Execute the API
from the SQL script, in the same session.
EXEC <procedure
name> ;

— Once the API
completes execution, disable trace
ALTER SESSION SET
EVENTS ‘10046 trace name context off’;

— Locate the trace
file based on the tracefile identifier
SELECT VALUE FROM
V$PARAMETER WHERE NAME = ‘user_dump_dest’;

— Generate the
tkprof of the trace file
tkprof
<trace_File>.trc <tkprof>.out sys=no explain=apps/<apps pwd>


To Enable Trace using
oradebug  at session Level.
1.   Obtain the SPID from v$process.  

SQL>
select username, spid from v$process;

2.   Start the debug session with the SPID of the
process that needs traced.

SQL>
oradebug setospid 2280

The
oradebug command below will enable the maximum tracing possible:

SQL>
oradebug event 10046 trace name context forever, level 12

1.   Turn tracing off.

SQL>
oradebug event 10046 trace name context off

2.   Obtain the trace file name.  The oradebug facility provides an easy way to
obtain the file name:  

SQL>
oradebug tracefile_name
c:oracle9iadminORCL92udumpmooracle_ora_2280.trc
Now  we can use the Tkprof Utilty to get the
readable format.

Enable Trace for particular session  :
For
example to enable level 1 trace in a session with SID 9 and serial number 29
use

Event
10046 level 12 trace can be enabled using

 EXECUTE dbms_support.start_trace_in_session
(9,29,binds=>true,waits=>true);

Trace
can be disabled using

 dbms_support.stop_trace_in_session (9,29);

select
a.SID,a.SERIAL#,b.USERNAME,b.PROGRAM from v$session a , v$process b where
a.PADDR=b.ADDR and b.SPID=’&SPID’
EXECUTE
DBMS_SYSTEM.set_sql_trace_in_session(sid=>1390, serial#=>7860,
sql_trace=>TRUE);

Reference:
How To Use SQL Trace And TKPROF For Performance
Issues with EBusiness Suite [ID 980711.1]
How to Enable Trace or Debug for APIs executed as
SQL Script Outside of the Applications ? [Video] [ID 869386.1]
Recent Posts