Re: what is a "module" in the context of DBMS_APPLICATION_INFO.SET_MODULE?

From: gym dot scuba dot kennedy at gmail <>
Date: Sun, 20 Jul 2008 08:55:59 GMT
Message-ID: <z4Dgk.173$5Q.106@trnddc06>

"l'il john l'concharoo" <> wrote in message
> hi group,
> first off, thanks to Steve Howard and DA Morgan for helping me out on my
> last post. much appreciated.
> my question today refers to these statements in the oracle documentation
> [emphasis mine]:
> "Application developers can use the DBMS_APPLICATION_INFO package
> with Oracle Trace and the SQL trace facility to record names of executing
> _modules_ ..."
> "..Your applications should set the name of the module and name of
> the action automatically each time a user enters that _module_ ..."
> i assume that the use of the word "module" there is used in the general
> sql sense (referring to an object that contains sql statements, routines
> or procedures). or does the word "module" have a different meaning in
> oracle?
> i'm a little unsure because of the following use of
> DBMS_APPLICATION_INFO.SET_MODULE in a procedure named "foo". "foo" is a
> small part of a large application whose overall purpose is to _transfer_
> information between various systems:
> CREATE or replace PROCEDURE foo (
> name VARCHAR2,
> salary NUMBER,
> manager NUMBER,
> title VARCHAR2,
> commission NUMBER,
> department NUMBER) AS
> session_id NUMBER := ...;
> module_name => 'TRANSFER',
> action_name => 'session_id');
> ...
> END;
> i want to understand the pl/sql to as detailed a level as i can; because
> i'm writing some java code that calls "foo" and other "modules" in the
> application. but unfortunately, the original pl/sql coder is long gone.
> (btw - if its not already obvious - i'm not a pl/sql coder by profession.
> i'm a java man ;) ).
> i think i know what's going on. but going by the examples at
> the intent of the original coder's use of DBMS_APPLICATION_INFO.SET_MODULE
> would have been clearer to me if his code did something like:
> ...
> module_name => 'foo',
> action_name => 'does something to foo data');
> ...
> so, my questions are:
> 1. what does "module" refer to in the context of
> 2. why do you think the original pl/sql coder did "module_name =>
> 'TRANSFER'" & "action_name => 'session_id'" instead of "module_name =>
> 'foo'" & "action_name => 'does something to foo data'"?
> thanks in advance for your help.

Think of set_module as a way of indicating to Oracle where in your application you are. Oracle doesn't care what it is set to. eg If the area of the application is customers you could set it to customer_login, customer_edit, customer_checkout... or whatever you want. It gives you a method of identifying what module in your application you are in. Helpful in debugging.
Jim Received on Sun Jul 20 2008 - 03:55:59 CDT

Original text of this message