Database Reference
In-Depth Information
C:> java ApplicationInstrumentation ndebes secret jdbc:oracle: thin:@//localhost:1521
/ TEN.oradbpro.com
JDBC driver version: 10.2.0.3.0
Please query V$SESSION and hit return to continue when done.
At this point, the program has connected, but not yet made any calls to the end-to-end
metrics interface. Now open another window and run the following query in SQL*Plus:
SQL> SELECT program, module, action, resource_consumer_group AS consumer_group
FROM v$session
WHERE service_name='TEN.oradbpro.com';
PROGRAM MODULE ACTION CONSUMER_GROUP
-------------------------- -------------------------- ------ --------------
ApplicationInstrumentation ApplicationInstrumentation OTHER_GROUPS
This shows that the undocumented property for setting program and module has worked.
The session is currently in consumer group OTHER_GROUPS. Next, press Return in the window
where the Java program is running. This will cause the program to advance to the section where
client identifier, module, and action are set. It will also execute a query that retrieves the session
identifier and the current date.
This is session 40 on October 30. 2007 22:37
Please query V$SESSION and hit return to continue when done.
The program pauses again, allowing you to see the effects of the calls to the end-to-end
metrics API in V$SESSION and V$SERV_MOD_ACT_STATS (timings are in microseconds).
SQL> SELECT program, module, action, client_identifier,
resource_consumer_group AS consumer_group
FROM v$session
WHERE service_name='TEN.oradbpro.com';
PROGRAM MODULE ACTION CLIENT_IDENTIFIER CONSUMER_GROUP
-------------------------- ------ ------ ----------------- --------------
ApplicationInstrumentation mod act Ray.Deevers LOW_GROUP
SQL> SELECT stat_name, value
FROM v$serv_mod_act_stats
WHERE service_name='TEN.oradbpro.com' AND module='mod' AND value > 0;
STAT_NAME VALUE
------------------------- -----
user calls 2
DB time 5555
DB CPU 5555
parse count (total) 1
parse time elapsed 63
execute count 2
sql execute elapsed time 303
opened cursors cumulative 1
Module, action, and client identifier are set, while the program name has been retained. As
expected, the session has been placed into the consumer group LOW_GROUP. Statistics for
 
Search WWH ::




Custom Search