Skip Headers

Oracle® Database Advanc ed Replication Management API Reference
10g Release 1 (10.1)

Part Number B10733-01
Go to Documentation Home
Home< /a>
Go to Book
List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to M
aster Index
Master Index
Go to Feedback page
Feedback

< td align="right" valign="top">View PDF
Go to previous page
Previous
Go to current chapter
Up

Next

ADD_conflicttype_RESOLUTION Procedure

These procedures desi gnate a method for resolving an update, delete, or uniqueness conflict. You must call these procedures from the master definition sit e. The procedure that you need to call is determined by the type of conflict that the routine resolves.

Table 18-12 ADD_conflicttype_RESOLUTION Procedur es  
Conflict Type Procedure Name
updat
e
ADD_UPDATE_RESOLUTION
uniqueness
ADD_UNIQUE_RESOLUTION
delete
ADD_DELETE_RESOL
UTION
See Also:

Chapter 6, "Configure Conflict Resoluti on" and Oracle Database Adva nced Replication for more information about designating methods to resolve update conflicts, selecting uniqueness conflict r esolution methods, and assigning delete conflict resolution methods

Syntax

DBMS_REPCAT.ADD_UPD
ATE_RESOLUTION (
   sname                  IN   VARCHAR2, 
   oname                  IN   VAR
CHAR2, 
   column_group           IN   VARCHAR2,
   sequence_no            IN   NUMBER,
   method                 IN   VARCHAR2, 
   parameter_column_name  IN   VARCHAR2 
                               | DBMS_REPCAT.VARCHAR2s 
                               | DBMS_UTILITY.LNAM
E_ARRAY, 
   priority_group         IN   VARCHAR2     := NULL,
   function_name          IN
 VARCHAR2     := NULL,
   comment                IN   VARCHAR2     := NULL);

DBMS_REPCAT.ADD_DELETE_RESOLUTION (
   sname                  IN   VARCHAR2, 
   oname
                IN   VARCHAR2, 
   sequence_no            IN   NUMBER,
   parameter_column_na
me  IN   VARCHAR2 | DBMS_REPCAT.VARCHAR2s, 
   function_name          IN   VARCHAR2,
   comme
nt                IN   VARCHAR2     := NULL
   method                 IN   VARCHAR2     := 'USER FUNCTION');

DBMS_REPCAT.ADD_UNIQUE_RESOLUTION(
   sname                 IN   VARCHAR2, 
   oname                 IN   VARCHAR2, 
   constraint_name       IN   VARCHAR2,
   sequence_no           IN   NUMBER,
   method                IN   VARCHAR2, 
   par
ameter_column_name IN   VARCHAR2
                              | DBMS_REPCAT.VARCHAR2s 

                           | DBMS_UTILITY.LNAME_ARRAY,
   function_name         IN   VARCHAR2     := NULL,
   comment               IN   VARCHAR2     := NULL);

Parameters

Table 18-13 ADD_conflicttype_RESOLUTION Procedure Parameters  
< /a> Parameter Description
sname

Name of the schema containing the table to be replicated.

oname

Name of the table to which you are adding a conflict resolution routine. The table can be the storage t able of a nested table.

column_group

Name of the column group to which you are add ing a conflict resolution routine. Column groups are required for update conflict resolution routines only.

constraint_name

Name of the unique constraint or unique index for which you are adding a conflict resolutio n routine. Use the name of the unique index if it differs from the name of the associated unique constraint. Constraint names are req uired for uniqueness conflict resolution routines only.

sequence_no

Order in which the designated conflict resolution methods should be applied.

method

Type of conf lict resolution routine that you want to create. This can be the name of one of the standard routines provided with advanced replicat ion, or, if you have written your own routine, you should choose user function, and provide the name of you r method as the function_name parameter.

The standard methods supported in this r elease for update conflicts are:

  • minimum
  • maximum
  • latest timestamp
  • earliest timestamp
  • additive, average
  • priority group
  • site priori ty
  • overwrite
  • discard

The standard methods supported in this release for uniquenes s conflicts are: append site name, append sequence, and discar d. There are no built-in (Oracle supplied) methods for delete conflicts.

parameter_column_name

Name of the columns used to resolve the conflict. The standard methods operate on a single column. For example, i f you are using the latest timestamp method for a column group, then you should pass the name of the column containing the timestamp value as this parameter. If your are using a user function, then you can resolve the conflict using any number of columns.

For update or unique conflicts, this parameter accep ts either a comma-delimited list of column names, or a PL/SQL index-by table of type DBMS_REPCAT.VARCHAR2 or DBMS_ UTILITY.LNAME_ARRAY. Use DBMS_UTILITY.LNAME_ARRAY if any column name is greater than or equal to 30 bytes, which may occur when you specify the attributes of column objects.

For de lete conflicts, this parameter accepts either a comma-delimited list of column names or a PL/SQL index-by table of type DBMS_RE PCAT.VARCHAR2.

The single value '*' indicates that you want to use all of the columns in the table (or column group, for update conflicts) to resolve the conflict. If you specify ' *', then the columns are passed to your function in alphabetical order.

LOB colu mns cannot be specified for this parameter.

See Also: "Usage Notes" if you are using column objects

priority_group

If you are using the priority group or site priori ty update conflict resolution method, then you must supply the name of the priority group that you have created.

See Chapter 6, "Configure Conflict Resolution" and Oracle Database Advanced Replication for more information. If you are using a different method, you can use the default value for this parameter, NULL. This para meter is applicable to update conflicts only.

function_name

If you selected the user function method, or if you are adding a delete conflict resolution routine, then you must supply the nam e of the conflict resolution routine that you have written. If you are using one of the standard methods, then you can use the defaul t value for this parameter, NULL.

comment

This user comment is added to the DBA_REPRESOLUTION view.

Exceptions

Table 18-14 ADD_conflicttype_RESOLUTION Procedure Exceptions  
< /a> Exception Description
nonmasterdef

Invocation site is not the master definition site.

missingobject

Specified object does not exist as a table in the specified schema using row-level replication.< /p>

missingschema

Specified schema does not exist.

missingcolumn

Column that you specified as part of the parameter_column_name parameter does not exist.

missinggroup

Specified column group does not exist.

missingprioritygroup

The priority group that you specified does not exist for the table.

invalidmethod

Resolution method that you specified is not recognized.

invalidparameter

Number of columns that you specified for the parameter_column_name parameter is invalid. (The standard routines take only one column name.)

< pre class="CEW">missingfunction

User function that you specified does not exist.

<
a name="94987">missingconstraint

Constraint that you specified for a uniqueness conflict does not exist.

notquiesced

Replication group to which the specified table belongs is not quiesced.

duplicateresolution

Specified conflic t resolution method is already registered.

duplicatesequence

The specified sequenc e number already exists for the specified object.

invalidprioritygroup

The specifi ed priority group does not exist.

paramtype

Type is different from the type assign ed to the priority group.

Usage Notes

If you are using column objects, then whether you ca n specify the attributes of the column objects for the parameter_column_name parameter depends on whether the conflict r esolution method is built-in (Oracle supplied) or user-created: