How To Generate Trace Files in in HTML/JSP (using Profile Option)
Note: This requires proper responsibility to set SQL Initialization statement using Profile option. Step 1. Login to the desired Form application.
Step 2. Select +Profile >> System ('Find System Profile Values' screen will pop up)
Step 3. Check 'User' and Type in the Username (in which the account for that user will be trace) Step 4. Type 'Initialization%' (Initialization SQL Statement - Custom)in the Profile box and Hit 'Find' (Click here for preview.)
Step 5. In the User box, type the following statement and Hit 'Save' (Click here for preview)
BEGIN FND_CTL.FND_SESS_CTL('','','TRUE','TRUE','','ALTER SESSION SET TRACEFILE_IDENTIFIER = TESTING MAX_DUMP_FILE_SIZE = 5000000 EVENTS ='''''' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''''');END;
Example :BEGIN FND_CTL.FND_SESS_CTL ('','','TRUE','TRUE','LOG', 'ALTER SESSION SET TRACEFILE_IDENTIFIER =''MURALIAR0001'' EVENTS=''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'''); END;
Step 6. Login to HTML / JSP page with username/password and start your flow. (Everything you do once login to HTML / JSP will get trace.)
Step 7. Logout of HTML / JSP application once you completed with your flow.
Step 8. Go back to the Profile option in the Form application and delete the Initialization SQL statement, and Hit 'Save'.
Step 9. Log in to the database server or login server and retrieve your trace file. Identify and retrieve the trace file using the tracefile_identifier specified in Step 5.
In this case the tracefile_identifier is TESTING. (Click here for Trace file locations) * Note: If you need to regenerate your trace or tracing a new flow, then repeat Step 1 to Step 8. To avoid self-confusion, choose a different name for your trace identifier everytime you set to trace. Step 10. See TKPROF section on how to format trace file into readable text.Trace Options Definition
No Trace
Tracing is not activated
Activities will not get traced.
Regular Trace
(Level 1) Contains SQL, execution statistics, and execution plan.
Provides execution path, row counts as well as produces smallest flat file.
Trace with Binds(Level 4) Regular Trace plus value supplied to SQL statement via local variables.
Trace with Waits(Level 8) Regular Trace plus database operation timings that the SQL waited to have done in order to complete, i.e. disk access.
Trace with Binds and Waits(Level 12) Regular trace with both waits and binds information.Contains the most complete information and will produce the largest trace file.
To get the trace file path on server.
select value from v$parameter where name = 'user_dump_dest' in DB node.
select * from v$session
ReplyDeletewhere CLIENT_IDENTIFIER = 'MPEDASANAGANTI'
order by prev_exec_start desc
/
exec dbms_system.set_ev(SID,SERIAL#,10046,12,'');
/
exec dbms_system.set_ev(SID,SERIAL#,10046,0,'');
/