How to capture Dbms_Lob.WRITE() event
Dear friends,We have an application that internally sends an anonymous PL/SQL block to update a CLOB column.
Something like this
DECLARE
v_clob CLOB:= Empty_Clob(); v_length INT; v_r_str VARCHAR2(8000):= 'new value';
BEGIN
SELECT clob_col INTO v_clob FROM sample WHERE ... FOR UPDATE;
Dbms_Lob.Trim(v_clob,0);
v_length := Length(v_r_str);
Dbms_Lob.WRITE (v_clob, v_length, 1, v_r_str);
END;
We wanted to audit clob value change. An after update trigger won't do any good since the CLOB column is done via Dbms_Lob.WRITE() not the update statement.
Something like this
DECLARE
v_clob CLOB:= Empty_Clob(); v_length INT; v_r_str VARCHAR2(8000):= 'new value';
BEGIN
SELECT clob_col INTO v_clob FROM sample WHERE ... FOR UPDATE;
Dbms_Lob.Trim(v_clob,0);
v_length := Length(v_r_str);
Dbms_Lob.WRITE (v_clob, v_length, 1, v_r_str);
END;
We wanted to audit clob value change. An after update trigger won't do any good since the CLOB column is done via Dbms_Lob.WRITE() not the update statement.
0