logging the input values the procedure/function is called with

  • From: dd yakkali <dd.yakkali@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 1 May 2009 18:24:32 -0400

PL/SQL gurus,

Here is what I essentially want: I want to throw a tracing procedure  in
every stored PL/SQL object which writes the input values with name/value
pairs that it is called with.
Tracing will be turned on or off based on a global parameter.

Here is an example of what

create or replace procedure proc1 ( input1 in number, input2 in varchar2 )
as
begin

log_input_values(PKG_UTILITY.DEBUG_LVL);

/*    actual code comes here */
----
.....
....
....

end;
/


based on the value of the  PKG_UTILITY.DEBUG_LVL log_input_values will write
the following

date of execution
name of the procedure
input values: input1 => value of the input, input2 => value of the input2



I know that I can trace the session with bind values to get the information,
but it become a pain in the neck when we have web application using JDBC
conneciton pools and i do not know which of the session executes the
procedure. Ofcourse Java logging can do this before it makes a call to the
procedure, but because of what ever reason at present I can not get them do
this.

Any help is greatly appreciated.


Thanks
Deen

Other related posts: