Professional Documents
Culture Documents
Generating Trace Files, Debug Logs, FND
Generating Trace Files, Debug Logs, FND
Generating Trace Files, Debug Logs, FND
Vikranth Medury
Principal Software Engineer ,Apps CoE
July 2008
• What is a Trace ?
• Uses :
– FRM errors
– Loosing the connection
– Deadlock / forms session hangs
• How to enable
Option 1: Obtain FRD Trace Using Profile Options
Option 2: Obtain FRD Trace Using Appsweb.cfg
Option 3: Obtain FRD in an ADHOC way
• Step 1: Set the profile option 'ICX: Forms Launcher' at user level to
same as site value
E.g. copy the site level value for profile option 'ICX: Forms Launcher' and paste it in user level field
so as to set it at the user level
• Step 2: Append the user value of ICX: Forms Launcher with the
Forms parameters for FRD i.e '?record=collect' replace hostname,
domain and port as applicable
E.g.
– In Servlet mode http://hostname.domain:port/forms/frmservlet?record=collect
– In Socket mode http://hostname.domain:port/OA_HTML/frmservlet?record=collect
• Step 5: Login using the user for whom the FRD trace is enabled
• Step 6: Perform the Activity that causes the error .
• Step 7: log out and close the browser .
• Step 2: Forms parameters for FRD can be set in appsweb.cfg file in one of the following ways :
– Method 1:
—
Look for "record=" parameter after the 'ENVIRONMENT SPECIFIC PARAMETERS' section and set it to collect
as shown below.
—
Once done login into Oracle Applications and launch forms via self-service.
– Method 2:
—
Update appsweb.cfg by adding the required Forms parameters for FRD
E.g.
[debug1]
record=collect
—
Logon to Applications 12i and start FRD trace by accessing the forms URL directly or updating profile option
ICX: Forms Launcher by appending '?config=debug1' as below
• Step 1: Logon to Applications 12i and start FRD trace by accessing the forms URL
directly and appending '?record=collect' as below
http://celalnx19.us.oracle.com:10007/forms/frmservlet?record=collect
The FRD log file will be written in the directory pointed by environment variable
$FORMS_TRACE_DIR. By default, the trace file with name collect_<pid> gets written in
$FORMS_TRACE_DIR , where <pid> is the process identifier.This is a simple text file and can
be viewed directly.
Note:
Unlike in Release 11i, you can no longer create a trace file in any ad hoc directory by using '&log=' directive
like '&log=/usr/tmp/user1.log'.In R12, the FRD log file will be written in the directory pointed by environment
variable $FORMS_TRACE_DIR and one can specify the log filename with '.log' extension in one of the
following ways:
1. In appsweb.cfg:
Look for "log=" parameter after the 'ENVIRONMENT SPECIFIC PARAMETERS' section and set it with name
that you want the trace file to be created with.
E.g
log=user1.log
2. Using +log directive in the URL used to set the frd trace via profile options or in ad hoc way
E.g
http://hostname.domain:port/forms/frmservlet?record=collect&log=user1.log
http://hostname.domain:port/OA_HTML/frmservlet?record=collect&log=user1.log
APPL_TOP=/global/oracle/visar03/apps/apps_st/appl
globsuptcelalnx19:/home/globsupt> cd $APPL_TOP
globsuptcelalnx19:/global/oracle/visar03/apps/apps_st/appl> ls *.env
APPSvisar03_celalnx19.env visar03_celalnx19.env visar03.env
globsuptcelalnx19:/global/oracle/visar03/apps/apps_st/appl> . visar03.env
globsuptcelalnx19:/global/oracle/visar03/apps/apps_st/appl> echo $FORMS_TRACE_DIR <
/global/oracle/visar03/inst/apps/visar03_celalnx19/logs/ora/10.1.2/forms
• Note 438652.1 :R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle
Applications
• Uses :
– No data found
– Wrong results
– Ora Error
– Performance issues
• Level:
– Level 1 (Normal Trace)
– Level 4 (Trace with Binds)
– Level 8 (Trace with Waits)
– Level 12 (Trace with Binds and Waits)
• How to enable
– From Forms
– Concurrent Program
– Profile Option
– Session Level*
– System Level*
– init.ora file
• Go to Sysadmin >Profile>System
– System Trace
—
Eg: alter system set events '10046 trace name context forever , level 12';
• SQLTEXPLAIN Plan
– What is it
– How to generate one
– Options in generating a SQLTEXPLAIN Plan
• TKPROF
– What is it
– How to generate one
– Options in generating a TKPROF trace
• Uses :
– No data found
– Date / Output Format Issues
– REP Error
– Performance issues
• Parameters
– TRACEOPTS=<option> eg TRACE_ALL
– TRACEFILE=<Actual Physical path/filename>
– TRACEMODE=TRACEMODE=<TRACE_APPEND> or
<TRACE_REPLACE>
• What is it ?
• What can cause it ?
• What type of trace is needed to debug this ?
• How to read the Stack trace.
• What is it ?
• When do we need it ?
• How do we generate it ?
• How to enable OS to create a Core file.
1) Run the Ulimit command to remove the OS limitations for generating the
core file .
2) Reproduce the problem .
3) Ensure core file is created in the folder where the exe is existing
4) Generate the stack trace form the core file using the OS utilities like
gdb, adb , dbx etc ...
====================
#0 0x0805dd75 in afudup ()
(gdb) bt
#0 0x0805dd75 in afudup ()
#1 0x081ab8f8 in ?? ()
#2 0x0805ec72 in afuparse ()
#3 0x00000000 in ?? ()
(gdb) where
#0 0x0805dd75 in afudup ()
#1 0x081ab8f8 in ?? ()
#2 0x0805ec72 in afuparse ()
#3 0x00000000 in ?? ()
===================
It helps not to use MODULE LIKE ‘zx.%' , as in that case all the messages from various
modules involved can get picked up . You can play with them once you have them in
excel.
• Note 438652.1 R12: Forms Runtime Diagnostics (FRD), Tracing And Logging for Forms
In Oracle Applications
• Note 373548.1
• Note 1812.1 on using gdb to extract stack trace from a core file.