Question: The Oracle docs have these notes on the module_name in dbms_application_info_set_module:
“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?
1. What does "module" refer to in the context of DBMS_APPLICATION_INFO.SET_MODULE?
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'"?
Answer (by Steve Callan): "The module name could be the name of a form in an Oracle Forms application, or the name of the code segment in an Oracle Precompilers application. The action name should usually be the name or description of the current transaction within a module."
Transferring a session ID looks like a valid operation - valid in the sense that you may have a need to know about a session ID in more than place. Using the above, the Forms built-in new_form would call a new form (module) and the user would then have two open forms, each of which can navigated to (not being modal).
The module name can be any "module" currently registered in V$SESSION. The module name can be "SQL*Plus", or the name of an external executable.
select
module,
action,
client_info
from
v$session;
MODULE ACTION CLIENT_INFO
------------------ ---------------- -------------------------
add_order complete Run via job
SELECT
sid,
serial#,
client_identifier,
service_name,
action,
module
from
v$session;
SID SERIAL# CLIENT_IDENTIFIER SERVICE_NAME ACTION MODULE
---------- ------- -------------------- ------------- ------------ -----------
145 34 george:127.0.0.1 ACCT INSERT MONTH PAYROLL
146 32 johnny:127.0.0.2 ACCT CANCEL CHECK BILLPAY
147 54 suzy:127.0.0.3 HR MODVACATION
156 64 lisa:127.0.0.4 HR INSERT HIST ADDEMPLOYEE