The SET_MODULE procedure is used to set the name of the current application or module.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
DBMS_APPLICATION_INFO.SET_MODULE (
module_name IN VARCHAR2,
action_name IN VARCHAR2);
Parameters
| Parameter | Description |
|---|---|
| module_name | The name of the current running module. When the current module terminates, if a new module exists, the name of the new module is used to call this procedure. If no new module exists, it is set to NULL. If the name exceeds 48 bytes, it will be truncated. |
| action_name | The name of the current operation in the current module. If you do not want to specify an operation, this value should be NULL. If the name exceeds 32 bytes, it will be truncated. |
Examples
CREATE or replace PROCEDURE addemployee(
ename VARCHAR2,
esalary NUMBER,
emanager NUMBER,
etitle VARCHAR2,
ecommission NUMBER,
edepartment NUMBER) AS
BEGIN
DBMS_APPLICATION_INFO.SET_MODULE(
module_name => 'addemployee',
action_name => 'insert into emp');
INSERT INTO emp
(name, empno, sal, mgr, job, hiredate, comm, deptno)
VALUES (ename, emp_seq.nextval, esalary, emanager, etitle, SYSDATE,
ecommission, edepartment);
DBMS_APPLICATION_INFO.SET_MODULE(null,null);
END;
