The SET_ACTION procedure is used to set the name of the current operation in the current module.
Syntax
DBMS_APPLICATION_INFO.SET_ACTION (
IN action_name VARCHAR(65535));
Parameters
The action_name parameter specifies the name of the current operation within the current module. When the current operation terminates, this procedure is called to set the name for the next operation. If no next operation exists, NULL is passed. Names longer than 32 bytes will be truncated.
Usage instructions
The operation name should be a text description of the current operation. It is recommended to set an operation name before starting each transaction. After a transaction completes, set the operation name to NULL to properly record subsequent transactions.
Examples
obclient> CREATE OR REPLACE PROCEDURE addemployee(
ename VARCHAR(65535),
esalary DECIMAL,
emanager DECIMAL,
etitle VARCHAR(65535)
) AS
BEGIN
DBMS_APPLICATION_INFO.SET_ACTION(
action_name => 'count the employee');
SELECT COUNT(*) FROM emp;
DBMS_APPLICATION_INFO.SET_ACTION(NULL);
END;
