Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Designating a Conflict Resolution Routine for a Table

There are separate procedures in the DBMS_REPCAT package for designating methods to resolve update, delete, and uniqueness conflicts. Use the ADD_UPDATE_RESOLUTION procedure to designate a method for resolving update conflicts for a given column group. Use the ADD_UNIQUE_RESOLUTION procedure to designate a method for resolving uniqueness conflicts involving a given unique constraint. Use the ADD_DELETE_RESOLUTION procedure to designate a method for resolving delete conflicts for a given table. (Recall that delete conflicts can result from an update to a primary key value.)

You must call these procedures from the master definition site. The conflict resolution method that you specify is not actually added until after the next time you generate replication support for the table.

You can designate multiple conflict resolution methods for a single column group, table, or constraint. If you provide multiple methods, they are applied in sequential order until the conflict is resolved or no more methods are available. You must provide a sequence order for each method that you add.

You can either designate one of the standard methods provided with the symmetric replication facility, or you can provide the name of a function that you have written yourself. Instructions for writing your own conflict resolution routine are provided [*]. If you write your own conflict resolution routine, you must call CREATE_MASTER_REPOBJECT for this function to ensure that it exists at each master site.

For example, to indicate that you first want to use the TIMESTAMP method to resolve UPDATE conflicts with the ADDRESS column group, you would make a procedure call similar to the following:

DBMS_REPCAT.ADD_UPDATE_RESOLUTION(
    sname                 => 'acctg', 
    oname                 => 'orders', 
    column_group          => 'address',
    sequence_no           => 1,
    method                => 'TIMESTAMP', 
    parameter_column_name => 'update_time');

Additional Information: The parameters for the ADD_UPDATE_RESOLUTION, ADD_DELETE_RESOLUTION, and ADD_UNIQUE_RESOLUTION procedures are described in Table 12 - 70, and the exceptions are listed in Table 12 - 71.


Contents Index Home Previous Next