The SET_MODULE procedure is used to set the name of the current application or module.
Syntax
DBMS_APPLICATION_INFO.SET_MODULE (
IN module_name VARCHAR(65535),
IN action_name VARCHAR(65535));
Parameters
Parameter |
Explanation |
|---|---|
| module_name | The name of the currently running module. When the current module terminates, if a new module exists, this procedure is called using the name of the new module. If no new module exists, it is set to NULL. Names longer than 48 bytes will be truncated. |
| action_name | The name of the current operation in the current module. If you do not want to specify an operation, set this value to NULL. If the name exceeds 32 bytes, it will be truncated. |
Examples
obclient> CREATE OR REPLACE PROCEDURE addemployee(
ename VARCHAR(65535),
esalary DECIMAL,
emanager DECIMAL,
etitle VARCHAR(65535)
) AS
BEGIN
DBMS_APPLICATION_INFO.SET_MODULE(
module_name => 'addemployee',
action_name => 'insert into emp');
INSERT INTO emp (name, empno, sal, mgr, job, hiredate)
VALUES (ename, emp_seq.NEXTVAL, esalary, emanager, etitle, SYSDATE);
DBMS_APPLICATION_INFO.SET_MODULE(NULL, NULL);
END;
