Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Nigel.

Asked: January 01, 2006 - 9:08 pm UTC

Last updated: July 11, 2016 - 3:17 pm UTC

Version: 9.2.0

Viewed 10K+ times! This question is

You Asked

Hello Tom,

Your books, Effective Oracle By Design and Expert Oracle (the original edition and volume one of the new edition), press home the importance of incorporating the ability to provide runtime trace and profiling information when required.

Much thought has been through my mind regarding a simple, consistent design of such functionality, applicable to most programming environments.

Bearing in mind that application instrumentation is good programming practice rather than Oracle specific advice, do you have a generic approach to designing an application that includes instrumentation and tracing available at the flick of a switch?

A high-level example for eager minds would be gladly received. Maybe using the code behind AskTom, if it's not a cheeky request? :)

Many thanks.

and Tom said...

Well, it varies by language and environment.

For example, when developing an Oracle application - you would be using

o parameter driven ability to enable/disable sql_trace
o dbms_application_info
o dbms_monitor in 10g

IN ADDITION to doing something in the application. If the application was written in plsql - I might be using our developed "debug.f" routine
</code> http://asktom.oracle.com/~tkyte/article2/index.html#Errors <code>

In C, I used a debugf macro...

In Java/JDBC, I actually just used my debug.f stored procedure (the java client was distributed to the desktop - a palm sync conduit - the trace was needed on the server, so debug.f was perfect).

So, I think there are many tools necessary depending on circumstances - such as the tool being used (HTMLDB has builtin stuff for example that you can use - change the word NO to YES in my urls and see what happens..), the products (Oracle has SQL_TRACE - not many others can say the same, the application server - 10g AS is fully instruemented as well) used and so on.

Rating

  (18 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Home for Orphans

Harrison, December 06, 2006 - 7:24 pm UTC

The "ask Tom" site no longer seems to comprise nerd tools that are legend in effective and one-on-one books:

The requested URL /~tkyte/article2/index.html was not found on this server.

The requested URL /~tkyte/debugf.html was not found on this server.

The requested URL /~tkyte/owarepl/doc/ was not found on this server.

What if they didn't have this kind of information on instrumentation at (just say,)the IRS, and some sorry-assed application accidentally raised your taxes? Boy, that would stink. Where do you think that there currently exists some good ideas on instrumenting Oracle and Java?

The Sun reference ("Effective" p 55) might now be
</code> http://java.sun.com/developer/EJTechTips/2003/tt0513.html <code>
But who really knows?


Tom Kyte
December 07, 2006 - 9:42 am UTC

~tkyte is now just tkyte

they turned off directory indexing on my server.

A reader, June 13, 2008 - 7:50 am UTC

Please give some example for implementing instrumentation.

Instrumentation Overhead

Rajeshwaran, Jeyabal, October 03, 2010 - 5:57 am UTC

Tom:

Does over Instrumentation of application code will leads to slowness of application?

rajesh@10GR2> create or replace procedure without_instrumentation (p_limit in number)
  2  as
  3     a positiven := 1;
  4     b positiven := 1;
  5     c positiven := 1;
  6     d positiven := 1;
  7  begin
  8    for i in 1..p_limit
  9    loop
 10               a := 42;
 11               b := a*2;
 12               c := a * 5;
 13               d := a+b+c;
 14    end loop;
 15  end without_instrumentation;
 16  /

Procedure created.

Elapsed: 00:00:00.03
rajesh@10GR2>
rajesh@10GR2> create or replace procedure with_instrumentation (p_limit in number)
  2  as
  3     a positiven := 1;
  4     b positiven := 1;
  5     c positiven := 1;
  6     d positiven := 1;
  7  begin
  8
  9    for i in 1..p_limit
 10    loop
 11     dbms_application_info.set_module( module_name=>'with_instrumentation',action_name=>'Iteration '||i);
 12     dbms_application_info.set_client_info ('Assigning variable A ');
 13               a := 42;
 14     dbms_application_info.set_client_info (null);
 15     dbms_application_info.set_client_info ('Assigning variable B ');
 16               b := a*2;
 17     dbms_application_info.set_client_info (null);
 18     dbms_application_info.set_client_info ('Assigning variable C ');
 19               c := a * 5;
 20     dbms_application_info.set_client_info (null);
 21     dbms_application_info.set_client_info ('Assigning variable D ');
 22               d := a+b+c;
 23     dbms_application_info.set_client_info (null);
 24     dbms_application_info.set_module(null,null);
 25    end loop;
 26
 27  end with_instrumentation;
 28  /

Procedure created.

Elapsed: 00:00:00.03
rajesh@10GR2>
rajesh@10GR2> declare
  2     x number ;
  3  begin
  4     for i in 1..3
  5     loop
  6             x := dbms_utility.get_time;
  7             without_instrumentation (power(100,i));
  8             dbms_output.put_line (' Time taken WITHOUT Instrumentation for '||power(100,i)||' Iteration = '|| ( dbms_utility.get_time - x ) );
  9             x := dbms_utility.get_time;
 10             with_instrumentation (power(100,i));
 11             dbms_output.put_line (' Time taken WITH Instrumentation for '||power(100,i)||' Iteration = '|| ( dbms_utility.get_time - x ) );
 12     end loop;
 13  end;
 14  /
 Time taken WITHOUT Instrumentation for 100 Iteration = 0
 Time taken WITH Instrumentation for 100 Iteration = 0
 Time taken WITHOUT Instrumentation for 10000 Iteration = 0
 Time taken WITH Instrumentation for 10000 Iteration = 21
 Time taken WITHOUT Instrumentation for 1000000 Iteration = 7
 Time taken WITH Instrumentation for 1000000 Iteration = 2079

PL/SQL procedure successfully completed.

Elapsed: 00:00:21.07
rajesh@10GR2>

Tom Kyte
October 04, 2010 - 2:12 am UTC

... Does over Instrumentation of application code will leads to slowness of application?
...

I've often postulated that the overhead of instrumentation is approximately -10.24%

Yes, NEGATIVE 10.24%.

That is, the code runs faster with instrumentation.


Evidence that is true:

a) oracle is heavily instrumented (v$ tables, sql_trace, AWR, ASH, statspack, etc etc etc)

b) without that instrumentation - you would not know where to begin to start to tune

c) therefore, we run faster with it than with out - much much faster...



Now that said, too much instrumentation is just that - TOO MUCH.

Use dbms_application info to set high level details - what function/procedure you are in. use other tracing that is usually DISABLED for what you did above (think about sql_trace - very very very detailed, hardly ever on)

You did sql_trace level tracing there - you don't want to do that every time, you want it usually off.

Common sense must prevail

Under Intstrumentation Leads to ...

Dana, October 04, 2010 - 10:56 am UTC

I've been down this road, and discovered instrumentation helped development time and quality.
I instrumented a package that had dozens of functions and procedures for a specific business function. In the process, I instrumented EVERYTHING at a granular level.

Turned out I made several false assumptions and the instrumentation is what made it possible to re-set and redevelop appropriate code.

Several years later, that instrumentation is what allowed a very quick diagnostic of an issue involving the same package. Without the instrumentation, it would have been unresolvable, and taken weeks to reprogram a "fix".

For my money, instrumentation is priceless.

David Aldridge, October 05, 2010 - 2:02 am UTC

There's nothing to say that the level of instrumentation and debugging can't be adaptive anyway. You might easily have instrumentation logic that works along the lines of:

start_timer
perform_operation
stop_timer

if elapsed_time < threshold_for_this_operation
then
perform minimal logging
else
perform detailed logging
end if

Of course one risk of this is that in the event of a general slowdown of the system (say some batch job overruns its window and conflicts with other jobs) then the logic above will trigger every operation to start doing more logging, thus increasing instrumentation overhead and hence system load, so you might want to code in an override.

All this sounds like a lot of work, and sometimes it is a significant proportion of development time, but it's generally based on widely reusable and cut'n'pastable code, and is time that will be made up later in debugging and performance tuning.

I particularly like the concept of negative overhead, by the way.
Tom Kyte
October 05, 2010 - 12:13 pm UTC

what I mean is the logging should be able to be turned ON and OFF easily - just like sql_trace.

the instrumentation should always be there

it should always be infinitely detailed

but most of the time, it shouldn't be executed.


dbms-application-info - call it upon procedure entry maybe (major routine entry) but not every other line of code, every time - that is too much.

but every other line of code should be instrumentation code - that normally DOES NOT RUN (like sql_trace). it only runs when something tells it to. It is too intense to run every time.

DBMS_UTILITY and DBMS_APPLICATION_INFO

Parthiban Nagarajan, February 14, 2011 - 9:14 am UTC

Hi Tom

I guess the two packages (DBMS_UTILITY (format_error_backtrace and format_call_stack) and DBMS_APPLICATION_INFO) would be good enough for instrumenting the code. Your thoughts ... ?

Thanks
Tom Kyte
February 14, 2011 - 9:25 am UTC

they would be insufficient.

dbms_utility is useful for "dumping" information - but not really "instrumenting". That would be like saying "sqlerrm" is useful for instrumenting. You might CALL sqlerrm from your instrumentation - but sqlerrm doesn't facilitate in itself.

dbms_application_info is a good start. It will show in real time where in your code you are right now.

But it won't show you where you've been, what you've done.

In my opinion you need a further level of instrumentation - the debug stuff. Remeber, I originally wrote:

<quote>
For example, when developing an Oracle application - you would be using

o parameter driven ability to enable/disable sql_trace
o dbms_application_info
o dbms_monitor in 10g

IN ADDITION to doing something in the application.
</quote>

that in addition (addressed above) is the big part, application info is just the tip

Dynamic SQL for Instrumentation

Parthiban Nagarajan, April 14, 2011 - 6:43 am UTC

Hi Tom

I see some pl/sql code where they use dynamic sql extensively - almost all places - so that they can log the source code itself. For e.g.
  begin
    v_sql_str := 'select ...';
    pk_log.log('Selecting ...', v_sql_str);
    execute immediate v_sql_str using ...;
    -- again
    v_sql_str ...
    pk_log ...
    execute immediate ...
    ...
  end;

When I questioned about dependency chain, they gave
select * from all_source where text like ...
as the answer.
Do you see any disadvantages of instrumenting code like this?
Thanks for your insights.

Tom Kyte
April 14, 2011 - 10:08 am UTC

I don't see any advantages to it.

I see disadvantages of:

o the dependency chain is broken, I cannot select * from user_dependencies and get meaningful data anymore.

o the compile time checking is lost, my code is infinitely more fragile

o I have to do bulk processing myself - I lose the implicit bulk processing provided by plsql with implicit static cursors. (it runs slower, does more work in the database)

o I lose the ability to have %rowtype and all kinds of plsql short cuts



I see this as being a "not smart idea". I don't see any advantage to "select * from all_source where text like...." using dynamic sql over static sql at all - BOTH would have the sql in there to search on.

I can search my code with static sql, further I have user_dependencies to search it even better.


I would discourage this approach entirely.

RE: Dynamic SQL for Instrumentation

Parthiban Nagarajan, April 14, 2011 - 10:18 am UTC

Hi Tom

This is to make clear.
(o) For the broken dependency chain, we search USER_SOURCE. We are not lost.

The advantage we have is
(o) Log all the SQL or PL/SQL to see where, why, when, how, and which exception is thrown.

Your comments please.
Regards
Tom Kyte
April 14, 2011 - 10:26 am UTC

(a) yes you are.

(b) and all you need is the LINE number, the sql is already in the database. Log the line number and you can pull up the CODE!!!!!!!


My comments stand, this is a horrible idea for the reasons above and more.

Not a good idea

Dan, April 14, 2011 - 2:42 pm UTC

We have a fair amount of dynamic SQL in some of our packages, and I wrote a package to analyse the USER_SOURCE looking for references in the text so we had better cross-referencing.

To make a long story short, it was a pretty futile effort... typically the table names are included in comments in the code, or even in commented out code. There are problems with subsets of names and word boundaries (TAB1 and TAB1A and TAB1A,TAB1) are hard to distinguish. The code may even be constructed over multiple non-contiguous rows of PL/SQL. There were so many false positives that it became useless.

You might be able to build a package that can handle a lot of this, but then you are spending your time and resources building and maintaining an imperfect version of something you can get for free.
Tom Kyte
April 14, 2011 - 5:43 pm UTC

Yeah, I'd like to see the guys above find all of the code that references table A, AA and AAA.

Easy with user_dependencies, impossible (pretty much) with SQL against all_source.


and all you need is the *LINE NUMBER*, everything else can be found from that.

instrumentation

A reader, April 14, 2011 - 11:16 pm UTC


issues calling trace package

Dominic, July 26, 2012 - 7:48 am UTC

Tom,

My current site recently went through an upgrade from 9.2 to 11.2.0.3 and it a major mutex wait problem with their bespoke trace package.

Admittedly, this package was being called thousands of times as it was quite liberally scattered throughout the entire application but it appeared to be a problem when it was being called from Forms, even when the procedure being called was switched to a simple begin null; end; statement.

Do you have any idea where we should start looking? or even which questions we should be asking as a start point?

How to instrument PL/SQL code?

A reader, December 17, 2012 - 3:42 pm UTC

Tom,
I have been looking for examples as to how to instrument PL/SQL code and have not been able to locate it on this website. I read blogs and discussions about instrumenting code but could not find one with an example. I have your book "Expert Oracle Database Architecture - Oracle Database 9i, 10g, 11g Programming Techniques and Solutions" and could not find this topic on there. Can you please point to some links or books where I might find this or give an example to do this in PL/SQL code. Thank you.
- Kirthi
Tom Kyte
December 18, 2012 - 12:44 pm UTC

you do this simply by logging lots of stuff - everything you can think of - and having a configurable way to turn it on and off - so you can see critical messages, informational, warning, all messages from a certain module, by a certain user, under a certain set of circumstances, etc etc etc.

https://www.google.com/search?q=how+to+instrument+code


see
http://tylermuth.wordpress.com/2011/11/09/logger-project-moved-temporarilly/

for a nice package to do the logging that is configurable.

A reader, December 18, 2012 - 1:30 pm UTC

Tom,
I checked "Tyler Muth's blog" about the logger project. I am not sure if I could use it at my work place.
I have a procedure that runs for an hour. I currently have insert statments sprinkled in the procedure code to log into a table with the information of what stage of processing it is in. The inserts are not autonomous transactions which I think it should be changed to if I want to keep it the way it is. I am exploring if there are any better ways to do it. Will the "DBMS_APPLICATION_INFO" be an appropriate one to use. The procedure I am trying to instrument is runs over night and I would like to be able to check the log messages in the morning to verify everything ran okay or if there are errors be able to check the log messages to see at what stage it errored.
Thank you,
KS

Tom Kyte
December 19, 2012 - 7:56 am UTC

I am not sure if I
could use it at my work place.


?? why not - it is delivered in source code format, you can read it, you could have written it - it is just PLSQL. You can review it - check it in - use it...


Will the
"DBMS_APPLICATION_INFO" be an appropriate one to use.


absolutely! session longops is what you want to look at (in addition to setting action, module and client_info).


dbms_application_info will give you "real time" feedback on something that is running - the logger package will give you tracing information for performance tuning, maintaining code and so on.

Where is debug.f ?

Charlie Zhu, November 04, 2013 - 10:25 pm UTC

Hi Tom,

I couldn't find where to download the source code of debug.f

Thanks,
Charlie
Tom Kyte
November 07, 2013 - 3:15 pm UTC

that is archaic - really really really old :)

I recommend this:

http://www.talkapex.com/2013/04/logger-200-alpha.html

for the 21st century.

21st century likes old tricks, logger vs debugf

Charlie (Yi) Zhu 木匠, November 28, 2013 - 7:39 pm UTC

Hi Tom,

There 2 good features that logger doesn't have.

1. tail -f debug_trace_file.
2. debug.f("%s %s", l_a, l_b);

Below code with logger to print local variables is awkward, it's not as flexible as debug.f("%s",l_abc). when I want to print different set of variables at each time, I have to add and delete some elements in array l_params.

logger.append_param(l_params, 'p_param1_todo',p_param1_todo);
logger.log('START', l_scope, null, l_params);

There is some workaround for "tail -f".

Thanks,
Charlie

Got my hands on the logger... Now curious about debug.f

udaykb, March 05, 2014 - 6:54 pm UTC

Hi Tom,

While I understand from the previous that you don't recommend the debug.f any more, I'm still curious to see the debug.f first hand.

Most of the links/URLs I could find, with my not-so-good google-skills, are either broken or they don't give out the complete code for it. :((

Please re-post debug.f and share the the link.

I can't thank you enough for giving us this site :)

Tracing using dbms_monitor.

Rajeshwaran Jeyabal, July 11, 2016 - 11:45 am UTC

Team,

I was learning dbms_monitor API, and tried a demo on my local database requesting to trace "All Actions" for a given module.

The requested module has two different actions, but the actions recorded in "v$serv_mod_act_stats" were shown as NULL.

What changes do i need in this script, to make the actions available in v$serv_mod_act_stat.

demo@ORA11G> create table t1 as
  2  select b.*, 0 as final_object_id
  3  from all_objects b;

Table created.

demo@ORA11G>
demo@ORA11G> alter table t1 add constraint t1_pk
  2  primary key(object_id);

Table altered.

demo@ORA11G>
demo@ORA11G> create table t2 as
  2  select distinct object_type ||
  3     trunc( row_number() over(partition by object_type
  4             order by created)/250) as patient_id,
  5     created + rownum as visit_date
  6  from all_objects;

Table created.

demo@ORA11G>
demo@ORA11G> exec dbms_stats.gather_table_stats(user,'T1');

PL/SQL procedure successfully completed.

demo@ORA11G> exec dbms_stats.gather_table_stats(user,'T2');

PL/SQL procedure successfully completed.

demo@ORA11G>
demo@ORA11G> create or replace package mypkg
  2  as
  3     procedure process_data;
  4  end;
  5  /

Package created.

demo@ORA11G> create or replace package body mypkg
  2  as
  3     procedure process_data
  4     as
  5             l_value int;
  6             l_avg_visit int;
  7     begin
  8             dbms_application_info.set_module(
  9                     module_name=>'MYPKG#PROCESS_DATA',
 10                     action_name=>'FINAL_OBJECT_ID_FINDING');
 11             for x in (select * from t1 order by owner,object_id)
 12             loop
 13                     if x.object_type ='PACKAGE' then
 14                             l_value := x.object_id ;
 15                     else
 16                             update t1 set
 17                                     final_object_id = l_value
 18                             where object_id = x.object_id;
 19                     end if;
 20             end loop;
 21
 22             dbms_application_info.set_action(
 23                     action_name=>'AVG_VISIT_DATE_FINDING');
 24             select avg( last_visit_date - visit_date )
 25             into l_avg_visit
 26             from (
 27             select a.visit_date , max(b.visit_date) as last_visit_date
 28             from t2 a, t2 b
 29             where a.patient_id = b.patient_id
 30             and b.visit_date < a.visit_date
 31             group by a.patient_id,a.visit_date
 32                      );
 33             dbms_output.put_line(' Average_visit_date ='||l_avg_visit);
 34             dbms_application_info.set_module(null,null);
 35     end;
 36  end;
 37  /

Package body created.

demo@ORA11G>
demo@ORA11G>
demo@ORA11G> select * from dba_enabled_aggregations;

no rows selected

demo@ORA11G> begin
  2     dbms_monitor.serv_mod_act_stat_enable(
  3             service_name=>sys_context('userenv','service_name'),
  4             module_name=>'MYPKG#PROCESS_DATA',
  5             action_name=>dbms_monitor.all_actions);
  6  end;
  7  /

PL/SQL procedure successfully completed.

demo@ORA11G> column PRIMARY_ID format a10
demo@ORA11G> column QUALIFIER_ID1 format a20
demo@ORA11G> column QUALIFIER_ID2 format a20
demo@ORA11G> select * from dba_enabled_aggregations;

AGGREGATION_TYPE      PRIMARY_ID QUALIFIER_ID1        QUALIFIER_ID2
--------------------- ---------- -------------------- --------------------
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA

1 row selected.

demo@ORA11G>
demo@ORA11G> set timing on
demo@ORA11G> exec mypkg.process_data
 Average_visit_date =-14

PL/SQL procedure successfully completed.

Elapsed: 00:00:08.28
demo@ORA11G> set timing off
demo@ORA11G>
demo@ORA11G> column service_name format a10
demo@ORA11G> column module format a20
demo@ORA11G> column action format a10
demo@ORA11G> column stat_name format a32
demo@ORA11G>
demo@ORA11G> select *
  2  from v$serv_mod_act_stats
  3  where service_name = sys_context('userenv','service_name')
  4  and module ='MYPKG#PROCESS_DATA'
  5  order by service_name, module, stat_id,stat_name, value;

AGGREGATION_TYPE      SERVICE_NA MODULE               ACTION        STAT_ID STAT_NAME                     VALUE
--------------------- ---------- -------------------- ---------- ---------- -------------------------------- ----------
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA                63887964 parse count (total)               0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA                85052502 opened cursors cumulative                 0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA               326482564 gc current blocks received                0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA               582481098 user commits                      0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA               798730793 workarea executions - onepass             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA               916801489 db block changes                  0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1099569955 application wait time             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1190468109 physical writes                   0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1236385760 redo size                         0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1388758753 gc current block receive time             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1431595225 parse time elapsed                0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              1759426133 gc cr block receive time          0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2263124246 physical reads                    0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2432034337 cluster wait time                 0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2453370665 execute count                     0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2748282437 DB CPU                            0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2821698184 sql execute elapsed time          0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2877738702 gc cr blocks received             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              2882015696 user calls                        0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3143187968 session logical reads             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3211650785 workarea executions - optimal             0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3332107451 user I/O wait time                0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3649082374 DB time                           0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3671147913 user rollbacks                    0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3678609077 session cursor cache hits                 0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3804491469 workarea executions - multipass           0
SERVICE_MODULE        ORA11G     MYPKG#PROCESS_DATA              3868577743 concurrency wait time             0

27 rows selected.

demo@ORA11G>
demo@ORA11G> begin
  2     dbms_monitor.serv_mod_act_stat_disable(
  3             service_name=>sys_context('userenv','service_name'),
  4             module_name=>'MYPKG#PROCESS_DATA',
  5             action_name=>dbms_monitor.all_actions);
  6  end;
  7  /

PL/SQL procedure successfully completed.

demo@ORA11G>


Chris Saxon
July 11, 2016 - 1:59 pm UTC

This is expected behavior. If you use all_actions, the stats are collected at the module level only:

"Omitting the parameter (or supplying ALL_ACTIONS constant) means enabling aggregation for all Actions for a given Service/MODULE combination. In this case, statistics are aggregated on the module level."

http://docs.oracle.com/database/121/ARPLS/d_monitor.htm#ARPLS67170

"Aggregation statistic type:

SERVICE_MODULE - Action value is NULL and the entry is an aggregate for all actions within a given module"

http://docs.oracle.com/database/121/REFRN/GUID-3748B2FE-1B5F-4FCE-B08C-CC89A45AD855.htm#REFRN30338

Chris

Tracing using dbms_monitor.

Rajeshwaran Jeyabal, July 11, 2016 - 2:42 pm UTC

Thanks Chris.

What changes do i need in this script, to make the actions available in v$serv_mod_act_stat.

So do i need to request each action explicitly? or any shortcuts available to have all actions available in v$serv_mod_act_stats.
Chris Saxon
July 11, 2016 - 3:17 pm UTC

So do i need to request each action explicitly?

I believe so, yes. I'm not aware of a way to do so otherwise.

More to Explore

Security

All of the vital components for a secure database are covered in the Security guide.