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 -> Materialized view replication and foreign keys

Materialized view replication and foreign keys

From: Antonios Christofides <A.Christofides_at_itia.ntua.gr>
Date: Fri, 12 Sep 2003 12:01:37 +0000 (UTC)
Message-ID: <slrnbm3dd0.24h.A.Christofides@acheloos.itia.civil.ntua.gr>


Hi,

I have set up replication between a master site and a materialized view
(mview) site, both Oracle 9i. Replication initially worked OK, but the
master's foreign key constraints had not been copied to the mview site; as a result, inconsistent data could be entered in the mview site (and would cause errors when propagating to the master).

Now I don't know if this was correct, but I created the foreign key constraints in the mview by issuing a series of ALTER TABLE ... ADD
(CONSTRAINT ... FOREIGN KEY etc.) statements. The mview site then worked
fine, but I can't refresh any more; refreshing causes some foreign key constraints to be violated (this depends on the order with which mviews are refreshed; if fk constraints were disabled during refresh and then re-enabled, the resulting database would be consistent).

Am I missing something painfully obvious? What is the correct way of maintaining copies of the master's fk constraints on the mview?

Thanks! Received on Fri Sep 12 2003 - 07:01:37 CDT

Original text of this message

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