The DBMS_APPLICATION_INFO package is used to record the names of the module or transaction that is being executed in a database for debugging and the tracking of module performance. Applications allow system administrators to track module performance. System administrators can also track the resource usage of the module by the record name.
Subprograms
Subprogram | Description |
READ_CLIENT_INFO Procedure | Reads the value of the |
READ_MODULE Procedure | Reads the values of the module and action fields in the current session. |
SET_ACTION Procedure | Specifies the name of the action that is being executed in the current module. |
SET_CLIENT_INFO Procedure | Configures the |
SET_MODULE Procedure | Sets the name of the module that is running to the name of a new module. |
READ_CLIENT_INFO
Syntax
DBMS_APPLICATION_INFO.READ_CLIENT_INFO (
client_info OUT VARCHAR2);
Parameters
Parameter | Description |
client_info | Returns the value of the |
READ_MODULE
Syntax
DBMS_APPLICATION_INFO.READ_MODULE (
module_name OUT VARCHAR2,
action_name OUT VARCHAR2);
Parameters
Parameter | Description |
module_name | The module value that is last specified by the |
action_name | The action value that is last specified by the |
SET_ACTION
Syntax
DBMS_APPLICATION_INFO.SET_ACTION (
action_name IN VARCHAR2);
Parameters
Parameter | Description |
action_name | The name of the action that is being executed in the current module. When the current action is terminated, the next action is used to call the stored procedure if the next action exists. If the next action does not exist, NULL is called. Note If an action name contains more than 64 bytes in length, the action name is truncated. |
SET_CLIENT_INFO
Syntax
DBMS_APPLICATION_INFO.SET_CLIENT_INFO (
client_info IN VARCHAR2);
Parameters
Parameter | Description |
client_info | The information about the client application. |
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 module that is running. When the current module is terminated, the name of the next module is used to call the stored procedure if the next module exists. If the next action does not exist, NULL is called. Note If a module name contains more than 64 bytes in length, the module name is truncated. |
action_name | The name of the action that is being executed in the current module. If you do not want to specify an action, set this parameter to NULL. Note If an action name contains more than 64 bytes in length, the action name is truncated. |
Example
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;