.com Solutions Inc. - logo  
Products - Header Buttons
.
Repgen bullet item 7b Installgen bullet item 7b FmPro Migratorbullet item 7b CGIScripter
.
.
.

.
.

Products - Title Graphic

Repgen Order Button

Repgen Features and Benefits

Repgen Demo Available for download...

.

-- script name: reptriggers
-- Features: Creates replication related triggers for all replicated tables
-- to support date_modified and site_id columns used for
-- replication conflict resolution.
-- NOTE: This file needs to be run at each master site.
-- Copyright 2002 by .com Solutions Inc.
-- This output file was created by Repgen version 2.2.4 on Fri May 31 13:29:24 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net

-- ************** customer_repgroup
-- ########## customers
CREATE OR REPLACE TRIGGER WIDGETS1.CUSTOMERS_REP
BEFORE UPDATE ON WIDGETS1.CUSTOMERS
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
IF NOT DBMS_REPUTIL.FROM_REMOTE THEN
-- only execute this code if trigger is NOT fired by replication

-- update the date modified column for replication conflict resolution
:NEW.DATE_MODIFIED := SYSDATE;
-- update the site id column for replication conflict resolution
:NEW.SITE_NAME := DBMS_REPUTIL.GLOBAL_NAME;
END IF;
END;
-- END PL/SQL BLOCK ----------------------------------
/

-- ########## addresses
CREATE OR REPLACE TRIGGER WIDGETS1.ADDRESSES_REP
BEFORE UPDATE ON WIDGETS1.ADDRESSES
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
IF NOT DBMS_REPUTIL.FROM_REMOTE THEN
-- only execute this code if trigger is NOT fired by replication

-- update the date modified column for replication conflict resolution
:NEW.DATE_UPDATED := SYSDATE;
-- update the site id column for replication conflict resolution
:NEW.SITE_ID := DBMS_REPUTIL.GLOBAL_NAME;
END IF;
END;
-- END PL/SQL BLOCK ----------------------------------
/


-- ************** static_tables_repgroup
-- ########## state_province
CREATE OR REPLACE TRIGGER WIDGETS1.STATE_PROVINCE_REP
BEFORE UPDATE ON WIDGETS1.STATE_PROVINCE
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
IF NOT DBMS_REPUTIL.FROM_REMOTE THEN
-- only execute this code if trigger is NOT fired by replication

-- update the date modified column for replication conflict resolution
:NEW.DATE_MODIFIED := SYSDATE;
-- update the site id column for replication conflict resolution
:NEW.SITE_NAME := DBMS_REPUTIL.GLOBAL_NAME;
END IF;
END;
-- END PL/SQL BLOCK ----------------------------------
/

-- ########## country
CREATE OR REPLACE TRIGGER WIDGETS1.COUNTRY_REP
BEFORE UPDATE ON WIDGETS1.COUNTRY
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
IF NOT DBMS_REPUTIL.FROM_REMOTE THEN
-- only execute this code if trigger is NOT fired by replication

-- update the date modified column for replication conflict resolution
:NEW.DATE_MODIFIED := SYSDATE;
-- update the site id column for replication conflict resolution
:NEW.SITE_ID := DBMS_REPUTIL.GLOBAL_NAME;
END IF;
END;
-- END PL/SQL BLOCK ----------------------------------
/




.

hline

. .

.

. .
 

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact