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

Home -> Community -> Usenet -> c.d.o.misc -> triggers and replication

triggers and replication

From: steve <steve_at_aol.com>
Date: Fri, 3 Mar 2006 11:40:44 +0800
Message-ID: <du8drs0t4s@news1.newsguy.com>


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

Original text of this message

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