Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> LOB with trigger

LOB with trigger

From: mm <ma2001fr_at_yahoo.fr>
Date: 26 Dec 2004 10:24:16 -0800
Message-ID: <f1fc67fb.0412261024.1b474b13@posting.google.com>


My question is about lobs within trigger. I have to create triggers on insert/update/delete on tables in order to perform specific auditing.
For regular column type,it is ok.
But for blob column type, i do not have a good lob locator in the :new variable.

ex:
create table bb (id number,name varchar2(10),obj blob); create table bbaudit(id number,action char(1),timest date,name varchar2(10),obj blob);

create trigger TG_BB_UI
BEFORE INSERT OR UPDATE on BB
FOR EACH ROW
DECLARE
sAction CHAR(1);
BEGIN
IF INSERTING THEN
  sAction:='I';
ELSIF UPDATING THEN
  sAction:='U';
END IF;
insert into bbaudit (ID,ACTION,TIMEST,NAME,OBJ) values (:new.id,sAction,sysdate,:new.name,:new.OBJ); END; According to Oracle, trigger does not support LOBs. In regular trigger :old reference can be read but not written AND :new reference cannot be read nor written.

Someone does have an idea about how to resolve this restriction. Received on Sun Dec 26 2004 - 12:24:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US