Sunday, November 9, 2008

Diagnostics in Oracle Applications

A very common problem that I have heard from lots of people is how do we enable diagnostics in Oracle Applications. By diagnostics, I mean how do we trace transactions, trace jvm details etc.

In this part, I want to detail tracing transactions.

Tracing Self Service Transactions (Metalink Note: 275875.1):

1. Set profile FND : Diagnostics to Yes at user level Login to Self Service
2. Click on Diagnostics icon at the top of page Select ‘Set Trace Level’ & Select the trace level
3. Complete the transactions and 'Set Trace Level' to No Trace

Turning trace from code:
1. alter session set statistics_level=all
2. alter session set events '10046 trace name context forever, level 12'

Tracing for Concurrent Programs(Metalink Note: 135389.1 and 603390.1)

1. App Support member provides the User name used to execute the Concurrent programs and
the list of concurrent programs and time when this should be set to DBAs
2. DBA logs in to SysAdmin and sets the Level 12 trace for the specific concurrent programs
executed by the user. This is done by setting the "Initialization SQL Statement - Custom" profile
for that user to the following (all in one line).

BEGIN FND_CTL.FND_SESS_CTL('','','','','','ALTER SESSION SET EVENTS ='''''' 10046
TRACE NAME CONTEXT FOREVER, LEVEL 12 '''''); END;

3. Once done, Level 12 trace files will be produced for all programs executing via that
user. So this needs to be tracked so we can associate the right trace file to the right program.

4. Once the job completes, switch off the profile option (just nullify it) so further traces are not
created.