Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Propagating DDL Changes Among Master Sites

Whenever you make a Data Definition Language (DDL) change in a replicated environment, for example, by calling DBMS_REPCAT.ALTER_MASTER_REPOBJECT, this change must be propagated to all other sites in the replicated environment. Note that, in this manual, "DDL changes" refer to any schema-level changes, whether they involve user-supplied DDL statements (as is the case with ALTER_MASTER_REPOBJECT), or not (as is the case with CREATE_MASTER_REPOBJECT and other DDL-like procedures).

Warning: Schema level changes should only be made using the procedures provided in the DBMS_REPCAT package. As a replication administrator, you must ensure that any local customizations made outside the scope of the replication facility do not interfere with replication activities.

By synchronously broadcasting the change Oracle ensures that all sites are aware of the change, and thus are capable of remaining in sync. By allowing the change to be applied at the site at a future point in time, Oracle provides you with the flexibility to choose the most appropriate time to apply changes at a site.

If an object requires automatically generated replication support, you must regenerate this support after you alter the object by calling the GENERATE_REPLICATION_SUPPORT procedure. Oracle then updates the generated triggers, packages and procedures as necessary to support replication of the altered object at all master sites.

Note that although the DDL must be successfully applied at the master definition site in order for these procedures to complete without error, this does not guarantee that the DDL is successfully applied at each master site. The RepCatLog view contains interim status and any asynchronous error messages generated by the request.

Any snapshot sites that are affected by a DDL change are updated the next time you perform a refresh of the snapshot site. While all master sites can communicate with one another, snapshot sites can only communicate with their associated master site. For more information on snapshot site refresh, see [*].

If you must alter the shape of a snapshot as the result of a change to its master, you must drop and recreate the snapshot by calling the DBMS_REPCAT.DROP_SNAPSHOT_REPOBJECT procedure and then the DBMS_REPCAT.CREATE_SNAPSHOT_REPOBJECT procedure.


Contents Index Home Previous Next