Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The conflict "Command affected 0 row(s)" is the most common type of conflict that can occur with replication. This conflict can be on a delete or update statement.

This conflict is indicating indicates that the data is no longer in sync between the source and target data. 

...

In order to determine where the difference is, the conflicting SQL can be manually run on the target database. It is run repeatedly The process is to run it repeatedly each time removing 1 predicate.

...

This query will also return 0 rows when it is run on the target as it has the same conditions as the delete statement causing which caused the conflict. 

Now remove the last predicate in the where clause and run again. In the case "and ACCEPTEDDATETIME" is removed:

Panel
bgColorCCC
SELECT * from SCOTT."REQUESTS" 
where (1=1)
and ID = 3567
and TYPE IS NULL
and VERSION = 4
and STATE IS NULL
and STATUS = 'A'
and STATUSLASTMODIFIED = to_timestamp('2013.08.23 17:39:38.788000000', 'yyyy.mm.dd hh24:mi:ss.ff')
and NAMESPACEID = 1
and ISRELATIVE IS NULL
and RELATIVEBASEDATE = 3
;

If this now returns a record on the target database, then the data conflict is due to predicate that has just been removed.  In this case "ACCEPTEDDATETIME"

If this still returns 0 rows, then remove the next predicate and run again.

...

The next step is to determine why the data is different. Compare the same row on source and target to determine what the difference is. Is it due to:

  1. The data not being in sync before the replication started?
  2. Someone else changed the data on the target?
  3. Open transactions on the target database. Please see Uncommitted transactions

Once it is understood why the conflict occurs, then conflict can be /wiki/spaces/UGDREP/pages/15761558.

If the data is different because of 1 or 2 abovedivergence is too great and it is not possible to resolve iit through the conflict, then the table should be manually resynched. Please see http://support.dbvisit.com/entries/24422248-Synching-up-one-table-when-it-gets-out-of-sync