There are some well-known methods I used to use most often:
- The easiest one – “catch” the DB session while it’s executing and enable trace manually with DBMS_SESSION.START_TRACE_IN_SESSION, DBMS_MONITOR.SESSION_TRACE_ENABLE or other command you like best;
- Enable tracing for the concurrent program using “Enable Trace” option inSystem Administrator responsibility -> Concurrent -> Program -> Define form.
How to avoid these drawbacks? There’s a profile option “SQL Statement – Custom”, set it to a value: “BEGIN FND_CTL.FND_SESS_CTL(”,”, ”, ‘TRUE’,”,’ALTER SESSION SET TRACEFILE_IDENTIFIER=’||””||’USERID’ ||””||’ EVENTS =’||””||’ 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 ‘||””); END;” and you’ll get a trace file with all the waitevents and binds for all the user sessions. The statement can be adjusted to your needs, but remember – the profile option value field is just 240 characters long. But here’s another problem – all the user sessions are traced including self service, forms, scheduled CRs and submitted CR’s. You may end up with hundreds of trace files struggling to find the needed one.
As I later found out, there is a nice profile option “Concurrent: Allow Debugging“, which allows enabling of debugging/tracing levels just for a particular concurrent request upon submission. You can set it to “Yes” and instruct the user to submit the request once again and use the button “Debug Options”…
you’ll get a single trace file with a name {sid}_ora_{process_id}_{eBS_User}_CR{request_id}.trc in your DB udump directory.
No comments:
Post a Comment