DBMS APPLICATION INFO
DBMS_APPLICATION_INFO#
The DBMS_APPLICATION_INFO package tracks and manages the performance of the application by setting or getting values for the V$SESSION performance view.
The procedures and functions which are comprised of the DBMS_APPLICATION_INFO package are listed in the following table below.
Procedures/Functions | Description |
---|---|
READ_CLIENT_INFO | Imports MODULE and ACTION values specified in V$SESSION. |
READ_MODULE | Imports MODULE and ACTION values specified in V$SESSION. |
SET_ACTION | Configures values of ACTION in V$SESSION. |
SET_CLIENT_INFO | Configures values of CLIENT_INFO in V$SESSION. |
SET_MODULE | Configures MODULE and ACTION values of V$SESSION. |
READ_CLIENT_INFO#
The READ_CLIENT_INFO imports application information of client accessed to the current session.
Syntax#
DBMS_APPLICATION_INFO.READ_CLIENT_INFO(client_info OUT VARCHAR(128));
Parameter#
Name | Input/Output | Data Type | Description |
---|---|---|---|
client_info | OUT | VARCHAR(128) | Information of configured client applicaiton |
Return Value#
The number of records processed by executing a cursor are returned.
Exception#
There is no exception.
Example#
Import values of currently executing client information in the current session then print.
iSQL> var v1 varchar(128);
iSQL> EXEC DBMS_APPLICATION_INFO.READ_CLIENT_INFO(:v1);
iSQL> EXEC PRINTLN(:v1);
READ_MODULE#
The READ_MODULE imports values of MODULE and ACTION specified in the V$SESSION performance view.
Syntax#
DBMS_APPLICATION_INFO.READ_MODULE(module_name OUT VARCHAR(128), action_name OUT VARCHAR(128));
Parameter#
Name | In/Output | Data Type | Description |
---|---|---|---|
module_name | OUT | VARCHAR(128) | Specified values in the module. |
action_name | OUT | VARCHAR(128) | Specified action values. |
Return Value#
Because it is a stored procedure, there is no return value.
Exception#
There is no exception.
Example#
Import module name and action value of the procedure which is currently being executed then print.
iSQL> var v1 varchar(128);
iSQL> var v2 varchar(128)
iSQL> EXEC DBMS_APPLICATION_INFO.READ_MODEUL(:v1, :v2);
iSQL> EXEC PRINTLN(:v1);
iSQL> EXEC PRINTLN(:v2);
SET_ACTION#
The SET_ACTION is a procedure configuring values of the ACTION column in V$SESSION performance view.
Syntax#
DBMS_APPLICATION_INFO.SET_ACTION (action_name VARCHAR(128));
Parameter#
Nameq | In/Output | Data Type | Description |
---|---|---|---|
action_name | IN | VARCHAR(128) | The values of ACTION column that will be specified. |
Return Value#
Because it is a stored procedure, there is no return value.
Exception#
There is no exception.
Example#
The SET_ACTION sets the status of currently operating procedure to stop.
iSQL> EXEC DBMS_APPLICATION_INFO.SET_ACTION( 'stop');
SET_CLIENT_INFO#
The SET_CLIENT_INFO configures the client information which is accessed to V$SESSION performance view.
Syntax#
DBMS_APPLICATION_INFO.SET_CLIENT_INFO(client_info VARCHAR(128));
Parameter#
Name | In/Output | Data Type | Description |
---|---|---|---|
client_info | IN | VARCHAR(128) | Client application information |
Return Value#
Because it is a stored procedure, there is no return value.
Exception#
There is no exception.
Example#
This sets the client information to test_application.
iSQL> EXEC DBMS_APPLICATION_INFO.SET_CLIENT_INFO('test_application');
SET_MODULE#
The SET_MODULE procedure configures MODULE and values of ACTION column(s) in V$SESSION performance view.
Syntax#
DBMS_APPLICATION_INFO.SET_MODULE(module_name VARCHAR(128), action_name
VARCHAR(128));
Parameters#
Name | In/Output | Data Type | Description |
---|---|---|---|
module_name | IN | VARCHAR(128) | The module values which will be configured |
action_name | IN | VARCHAR(128) | The value of ACTION column which will be configured |
Return Value#
Because it is a stored procedure, there is no return value.
Exception#
There is no exception.
Example#
The SET_MODULE procedure modifies the module name of currently running procedure to altibase_module, and sets the status to be running.
iSQL> EXEC DBMS_APPLICATION_INFO.SET_MODULE('altibase_module', 'running');