User's Manual
VERIFY_ALL_COLUMNS is set to OFF, if an UPDATE statement
updates more than 128 columns, conflict resolution will not work.
A first conflict resolution example
In this example, conflicts in the Customer table in the two-table example
used in the tutorials are reported into a table for later review.
The database The two-table database is as follows:
rep_key =
rep_key
SalesRep
rep_key char(5)
name char(40)
Customer
cust_key char(12)
name char(40)
rep_key char(5)
Goals of the conflict
resolution
The conflict resolution will report conflicts on updates to the name column
in the Customer table into a separate table named ConflictLog.
The conflict resolution
objects
The conflict resolution tables are defined as follows:
CREATE TABLE OldCustomer(
cust_key CHAR( 12 ) NOT NULL,
name CHAR( 40 ) NOT NULL,
rep_key CHAR( 5 ) NOT NULL,
PRIMARY KEY ( cust_key )
)
CREATE TABLE RemoteCustomer(
cust_key CHAR( 12 ) NOT NULL,
name CHAR( 40 ) NOT NULL,
rep_key CHAR( 5 ) NOT NULL,
PRIMARY KEY ( cust_key )
)
Each of these tables has exactly the same columns and data types as the
Customer table itself. The only difference in their definition is that they do
not have a foreign key to the SalesRep table.
The conflict resolution procedure reports conflicts into a table named
ConflictLog, which has the following definition:
CREATE TABLE ConflictLog (
conflict_key numeric(5, 0) identity not null,
lost_name char(40) not null ,
won_name char(40) not null ,
primary key ( conflict_key )
)
The conflict resolution procedure is as follows:
168