Oracle7 Server Distributed Systems Volume II: Replicated Data
DBMS_REPCAT.ADD_conflicttype_RESOLUTION
Purpose
To designate a method for resolving an update, delete, or uniqueness conflict. You must call these procedures from the master definition site. The procedure that you need to call is determined by the type of conflict that the routine is used to resolve.
Conflict Type
| Procedure Name
|
update
| ADD_UPDATE_RESOLUTION
|
uniqueness
| ADD_UNIQUE_RESOLUTION
|
delete
| ADD_DELETE_RESOLUTION
|
For additional information, refer to .
Syntax
The parameters for the ADD_UPDATE_RESOLUTION procedure are described in Table 12 - 70, and the exceptions are listed in Table 12 - 71. The syntax for this procedure is shown below:
DBMS_REPCAT.ADD_UPDATE_RESOLUTION(
sname IN VARCHAR2,
oname IN VARCHAR2,
column_group IN VARCHAR2,
sequence_no IN NUMBER,
method IN VARCHAR2,
parameter_column_name IN VARCHAR2,
priority_group IN VARCHAR2 := NULL,
function_name IN VARCHAR2 := NULL,
comment IN VARCHAR2 := NULL)
The parameters for the ADD_DELETE_RESOLUTION procedure are described in Table 12 - 70, and the exceptions are listed in Table 12 - 71. The syntax for this procedure is shown below:
DBMS_REPCAT.ADD_DELETE_RESOLUTION(
sname IN VARCHAR2,
oname IN VARCHAR2,
sequence_no IN NUMBER,
parameter_column_name IN VARCHAR2,
function_name IN VARCHAR2 := NULL,
comment IN VARCHAR2 := NULL)
The parameters for the ADD_UNIQUE_RESOLUTION procedure are described in Table 12 - 70, and the exceptions are listed in Table 12 - 71. The syntax for this procedure is shown below:
DBMS_REPCAT.ADD_UNIQUE_RESOLUTION(
sname IN VARCHAR2,
oname IN VARCHAR2,
constraint_name IN VARCHAR2,
sequence_no IN NUMBER,
method IN VARCHAR2,
parameter_column_name IN VARCHAR2,
function_name IN VARCHAR2 := NULL,
comment IN VARCHAR2 := NULL)
Parameter
| Description
|
sname
| The name of the schema containing the table to be replicated.
|
oname
| The name of the table for which you are adding a conflict resolution routine.
|
column_group
| The name of the column group for which you are adding a conflict resolution routine. Column groups are required for update conflict resolution routines only.
|
constraint_name
| The name of the unique constraint or unique index for which you are adding a conflict resolution routine. Use the name of the unique index if it differs from the name of the associated unique constraint. Constraint names are required for uniqueness conflict resolution routines only.
|
sequence_no
| The order in which the designated conflict resolution methods should be applied.
|
method
| The type of conflict resolution routine that you want to create. This can be the name of one of the standard routines provided with symmetric replication, or, if you have written your own routine, you should choose USER FUNCTION, and provide the name of your routine as the FUNCTION_NAME argument. The methods supported in this release are: MINIMUM, MAXIMUM, LATEST TIMESTAMP, EARLIEST TIMESTAMP, ADDITIVE, AVERAGE, PRIORITY GROUP, SITE PRIORITY, OVERWRITE, and DISCARD (for update conflicts) and APPEND SITE NAME, APPEND SEQUENCE NUMBER, and DISCARD (for uniqueness conflicts). There are no standard methods for delete conflicts, so this argument is not used.
|
parameter_column_name
| The name of the columns used to resolve the conflict. The standard methods operate on a single column. For example, if you are using the LATEST TIMESTAMP method for a column group, you should pass the name of the column containing the timestamp value as this argument. If your are using a USER FUNCTION, you can resolve the conflict using any number of columns. This argument accepts either a comma separated list of column names, or a PL/SQL table of type dbms_repcat.varchar2s. 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 `*', the columns will be passed to your function in alphabetical order.
|
priority_group
| If you are using the PRIORITY GROUP or SITE PRIORITY update conflict resolution method, you must supply the name of the priority group that you have created. Instructions for creating a priority group are included . If you are using a different method, you can use the default value for this argument, NULL. This argument 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, you must supply the name of the conflict resolution routine that you have written. If you are using one of the standard methods, you can use the default value for this argument, NULL.
|
comment
| This user comment is added to the RepResolution view.
|
Table 12 - 70. Parameters for ADD_UPDATE/DELETE_RESOLUTION
Exception
| Description
|
nonmasterdef
| The invocation site is not the masterdef site.
|
missingobject
| The given object does not exist as a table in the given schema using row-level replication.
|
missingschema
| The given schema does not exist.
|
missingcolumn
| The column that you specified as part of the PARAMETER_COLUMN_NAME argument does not exist.
|
missingprioritygroup
| The priority group that you specified does not exist for the table.
|
invalidmethod
| The resolution method that you specified is not recognized.
|
invalidparameter
| The number of columns that you specified for the PARAMETER_COLUMN_NAME argument is invalid. (The standard routines take only one column name.)
|
missingfunction
| The user function that you specified does not exist.
|
missingconstraint
| The constraint that you specified for a uniqueness conflict does not exist.
|
typefailure
| The datatype of one of the values that you specified for the PARAMETER_COLUMN_NAME argument is not one of the types supported for the given method.
|
Table 12 - 71. Exceptions for ADD_UPDATE/DELETE_RESOLUTION