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

Re: Materialized view replication and foreign keys

From: Domenic G. <domenicg_at_hotmail.com>
Date: 12 Sep 2003 12:46:20 -0700
Message-ID: <c7e08a19.0309121146.39fc5ced@posting.google.com>


If you are replicating master->mview site, the constraints are not supposed to replicate -- you're replicating a snapshot -- if you add to that snapshot, it does not go back to the master. That's called multi-master replication. You probably want to set up multi-master replication, where both sites update each other. Be careful though, you need to design so as to avoid conflicts. This is too complicated to discuss here.

Good luck,

Domenic.

Antonios Christofides <A.Christofides_at_itia.ntua.gr> wrote in message news:<slrnbm3dd0.24h.A.Christofides_at_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 - 14:46:20 CDT

Original text of this message

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