VERIFY_ALL_COLUMNSis set to OFF, if an UPDATE statement
updatesmore than 128 columns, conflict resolution will not work.
A first conflict resolution example
Inthis example, conflicts in the Customer table in the two-table example
usedin the tutorials are reported into a table for later review.
Thedatabase Thetwo-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)
Goalsof the conflict
resolution Theconflict resolution will report conflicts on updates to the name column
inthe Customer table into a separate table named ConflictLog.
Theconflict resolution
objects Theconflict 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 )
)
Eachof these tables has exactly the same columns and data types as the
Customertable itself. Theonly difference in their definition is that they do
nothave a foreign key to the SalesRep table.
Theconflict 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 )
)
Theconflict resolution procedure is as follows:
168