Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> triggers and replication
Hi,
currently i am running a replicated link.
every table that is replicated has the following trigger code
"ORACLE"."REPLICATION_19" BEFORE INSERT ON "ORACLE"."PCKSPC" REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW trigger code.
BEGIN
if (dbms_reputil.from_remote !=true)
then
:NEW.REP_INDEX:=REPKEY15();
:NEW.BORN:=SYSDATE;
:NEW.updated:=SYSDATE;
:NEW.DELETED:=0;
:NEW.site:=oursite();
end if;
END;
basically it sets up some minimum values needed for replication,
what i would prefer is to get ALL this code into a procedure.
BEGIN
if (dbms_reputil.from_remote !=true)
then
doreplicationstuff();
end if;
END;
how can i do this?
referencing the fields
:NEW.REP_INDEX:=REPKEY15();
:NEW.BORN:=SYSDATE;
:NEW.updated:=SYSDATE;
:NEW.DELETED:=0;
:NEW.site:=oursite();
inside a procedure cause an error.
Steve Received on Thu Mar 02 2006 - 21:40:44 CST