Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Removing a Master Site

To remove one or more master databases from your replicated environment, complete the following steps in order:

Dropping a Master Site If You Cannot Quiesce

Oracle Corporation recommends that DBMS_REPCAT.REMOVE_MASTER_DATABASES be called for a replicated object group only when that object group is quiesced. When an object group cannot be quiesced and one or more masters must be removed from the object group, the replication administrator must

The next time the object group is quiesced, in particular, the replication administrator must complete the following steps in order as soon as possible after the masters are removed.

Dropping a Master Site from a Replicated Environment

To remove one or more master databases from a replicated environment, call the REMOVE_MASTER_DATABASES procedure in the DBMS_REPCAT package.

Calling REMOVE_MASTER_DATABASES causes the replication triggers and their associated packages to be regenerated at all remaining master sites.

You cannot remove the master definition site. The databases being removed do not have to be accessible when you call this procedure. All other master databases in the replicated environment must be available.

For example, suppose A is the master definition site and sites B, C, D, and E are master sites for the replicated schema R. If masters C and E become inaccessible and should no longer be masters, you should execute the following procedure at site A:

DBMS_REPCAT.REMOVE_MASTER_DATABASES(
    gname       => 'R', 
    master_list => 'C,E');

The following code is also acceptable:

master_table dbms_utility.dblink_array;
...
master_table(1) := 'C';
master_table(2) := 'E';
DBMS_REPCAT.REMOVE_MASTER_DATABASES(
    gname        => 'R', 
    master_table => master_table);

After calling this procedure, you should call DROP_MASTER_REPGROUP at each of the master sites that you removed. Otherwise, all of the replication views, such as RepGroup, will still be available (making the object group appear to be replicated), but the site will no longer receive changes from other master sites.

Additional Information: The parameters for the REMOVE_MASTER_DATABASES procedure are described in Table 12 - 161, and the exceptions are listed in Table 12 - 162.

Dropping a Replicated Object Group from a Former Master Site

To drop a replicated object group from your current site, call the DROP_MASTER_REPGROUP procedure in the DBMS_REPCAT package, as shown in the following example:

DBMS_REPCAT.DROP_MASTER_REPGROUP(
    gname         => 'acct', 
    drop_contents => TRUE, 
    all_sites     => FALSE);

In this example, when this procedure is executed, the ACCT object group is no longer replicated at the current site. Because the second argument is TRUE, all replicated objects in this object group are dropped from the database.

Dropping the replicated object group removes all entries in the local replication views, such as RepGroup, that pertain to that replicated object group. Dropping the replicated object group at a master site also does not automatically remove that master site from the RepSite view at all other master sites. Before calling this procedure, you should call REMOVE_MASTER_DATABASES at the master definition site to ensure that replicated changes are no longer sent to the object group that you are dropping. Additionally, before calling this procedure, you can avoid unnecessary errors if you make sure that this object group is not being used as the master replication object group for any snapshot sites.

To drop the master definition site, you must first have dropped all of the master sites in the replicated environment. To drop the replicated object group from all sites, including the master definition site, you can call this procedure at the master definition site, and set ALL_SITES to TRUE.

Additional Information: The parameters for the DROP_MASTER_REPGROUP procedure are described in Table 12 - 121, and the exceptions are listed in Table 12 - 122.


Contents Index Home Previous Next