Databases Reference
In-Depth Information
4 *** SESSION ID:(133.39) 2007-09-06 20:23:52.514
5 =====================
6 PARSING IN CURSOR #7 len=59 dep=0 uid=34 oct=47 lid=34 tim=1161233430189798
hv=919966564 ad='22c5ec10'
7 BEGIN dbms_application_info.set_module('mod','act'); END;
8 END OF STMT
9 …
10 *** SESSION ID:(146.361) 2007-09-06 20:26:18.442
11 …
12 *** SESSION ID:(133.39) 2007-09-06 20:26:48.229
13 …
14 *** SESSION ID:(146.361) 2007-09-06 20:27:02.759
15 =====================
16 PARSING IN CURSOR #7 len=45 dep=0 uid=34 oct=3 lid=34 tim=1161233615975704
hv=2134668354 ad='2527ef28'
17 SELECT 'not instrumented' AS string FROM dual
18 …
19 *** SESSION ID:(133.39) 2007-09-06 20:27:27.502
20 …
21 PARSING IN CURSOR #2 len=53 dep=0 uid=34 oct=47 lid=34 tim=1161233640139316
hv=3853446089 ad='22c484d4'
22 BEGIN dbms_application_info.set_module('',''); END;
23 END OF STMT
24 PARSE #2:c=0,e=2,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1161233640139316
25 *** ACTION NAME:() 2007-09-06 20:27:27.503
26 *** MODULE NAME:() 2007-09-06 20:27:27.503
Lines 1 to 2 contain the module and action emitted due to the second session's call to
DBMS_APPLICATION_INFO
. Lines 10 to 14 show that the shared server process intermittently
serviced another session with
SID=146
and
SERIAL#=361
. Line 17 contains the string literal used
to mark the
SELECT
executed by the first session, which was not instrumented. Lines 25 to 26
mark the end of the trace file section that pertains to the module “mod” and the action “act”.
At this point, the module and action names no longer matched the settings in
DBA_ENABLED_
TRACES
made with
DBMS_MONITOR
, hence tracing in session 2 was switched off. In other words,
end-to-end tracing noted the new values for module and action and then switched off SQL
trace.
6
Since there are no entries for module and action between lines 10 and 19, TRCSESS
included all the trace file entries between these lines, although some of them belong to a
different session.
A correct implementation of TRCSESS would memorize the instrumentation settings for
each combination of
SID
and
SERIAL#
and use them to omit or include the trace file section that
follows a line with a new value for
SID
and
SERIAL#
. This approach may be used as a workaround.
Look for the
SESSION
ID
entry next to the module and action that we are interested in. Line 4
contains the
SID
and
SERIAL#
(133.39) that we need to pass to TRCSESS to get a correctly
6.
A dedicated server process servicing an application instrumented with JDBC end-to-end metrics
switches off SQL trace before emitting the new values for module and action that cause end-to-end
tracing to disable SQL trace. Since a dedicated server process, re-emits module, action, and client
identifier each time SQL trace is enabled, this will not lead to incorrect results.