Records the module or transaction name being executed in the current database session, enabling administrators to track module performance and resource usage.
Subprograms
| Subprogram | Description |
|---|---|
| READ_CLIENT_INFO procedure | Reads the value of the client_info field in the current session. |
| READ_MODULE procedure | Reads the module and action field values in the current session. |
| SET_ACTION procedure | Sets the name of the action being executed in the current module. |
| SET_CLIENT_INFO procedure | Sets the client_info field for the current session. |
| SET_MODULE procedure | Sets the name of the currently running module. |
READ_CLIENT_INFO
Syntax
DBMS_APPLICATION_INFO.READ_CLIENT_INFO (
client_info OUT VARCHAR2);Parameters
| Parameter | Description |
|---|---|
client_info | Returns the client_info value last set by the SET_CLIENT_INFO stored procedure. |
READ_MODULE
Syntax
DBMS_APPLICATION_INFO.READ_MODULE (
module_name OUT VARCHAR2,
action_name OUT VARCHAR2);Parameters
| Parameter | Description |
|---|---|
module_name | Returns the module value last set by the SET_MODULE stored procedure. |
action_name | Returns the action value last set by the SET_MODULE or SET_ACTION stored procedure. |
SET_ACTION
Syntax
DBMS_APPLICATION_INFO.SET_ACTION (
action_name IN VARCHAR2);Parameters
| Parameter | Description |
|---|---|
action_name | The name of the action being executed in the current module. When the current action ends, pass the next action name to call the stored procedure again, or pass NULL if there is no next action. Note Action names longer than 64 bytes are truncated. |
SET_CLIENT_INFO
Syntax
DBMS_APPLICATION_INFO.SET_CLIENT_INFO (
client_info IN VARCHAR2);Parameters
| Parameter | Description |
|---|---|
client_info | The client application information to record. |
SET_MODULE
Syntax
DBMS_APPLICATION_INFO.SET_MODULE (
module_name IN VARCHAR2,
action_name IN VARCHAR2);Parameters
| Parameter | Description |
|---|---|
module_name | The name of the currently running module. When the current module ends, pass the next module name to call the stored procedure again, or pass NULL if there is no next module. Note Module names longer than 64 bytes are truncated. |
action_name | The name of the action being executed in the current module. Pass NULL to leave the action unspecified. Note Action names longer than 64 bytes are truncated. |
Example
The following example sets client info, module, and action for a session, then reads the values back using polar_get_app_info and the READ procedures.
select pid,client_info,module,action from polar_get_app_info;
exec dbms_application_info.set_client_info('client2');
exec dbms_application_info.set_module('module2','action');
exec dbms_application_info.set_action('action2');
select pid,client_info,module,action from polar_get_app_info;
DECLARE
_clinent TEXT;
_mod_name TEXT;
_act_name TEXT;
BEGIN
dbms_application_info.read_client_info(_clinent);
dbms_application_info.read_module(_mod_name,_act_name);
raise notice 'client_info is : "%", module value is "%", action value is "%"', _clinent, _mod_name, _act_name;
END;