Re: Sync Failed; Record is Deleted -- Append Confusion

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



mikej711 <mikej711@xxxxxxxxxxx> wrote in
news:ad7b190a-89a1-4a28-a2ff-31dd6b594f19@xxxxxxxxxxxxxxxxxxxxxxxxxxx
m:

I'm still confused. Say I have two replicas, A and B. A has more
recent data changes so should overwrite B but B has a corrupted
table and won't sync with A. I make new replica C and append all
of B's data into it, minus the one corrupted record of course.

No, you DELETE the one corrupted record and recreate its data in a
new record.

Now, in reality, A
has more recent changes then B, but I'm no longer using B, I'm
using C, which has more recent timestamps than A because C's data
was just appended. Therefore, though I intend C to mirror B and be
overwritten by A, wouldn't C, with its new timestamps, falsely
overwrite A, resulting in data loss?

The key is to get rid of the corrupted record(s) and keep all the
rest. You recover what you can from the corrupted records and create
new records for those. This may involve more than one table if
there's referential integrity and the corrupted record has child
records. In that case, you'd make copies of the child records,
delete them and re-append the data (minus the replication fields)
when the parent record has been recreated.

Another point that may not be obvious:

When making copies of the records you're going to recreate, you omit
any of the replication fields, as you're not going to use those in
any way. You're preserving your data, not the replication
information.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.



Relevant Pages

  • Re: Sync Failed; Record is Deleted -- Append Confusion
    ... recent data changes so should overwrite B but B has a corrupted ... which has more recent timestamps than A because C's data ... delete them and re-append the data (minus the replication fields) ... retained and which are updated during sync. ...
    (microsoft.public.access.replication)
  • Re: AD Integrated problem
    ... > overwrite the other zone. ... > DCs before I figured out I just had to wait for replication. ... the DomainDnsZones, the bottom selection goes into the DomainNC, which is 2k ...
    (microsoft.public.win2000.dns)
  • Re: Synchronizing Access and SQL Server
    ... It's called Replication. ... I have to update stock and prices every night. ... and overwrite the old db. ... But I am going to be using SQL Server 2000 soon, and I know you don't just ...
    (comp.databases.ms-sqlserver)
  • Re: Publisher/Distributor crashed
    ... No - by default it'll overwrite the subscriber's data using the publisher's ... That's why I'd get the data synchronized (using Redgate or ... backup/restore) then remove replication, ...
    (microsoft.public.sqlserver.replication)
  • Re: do I need Indexed Views for Replication
    ... It looks like data changes at discrete ... > and then is static until the next package is run. ... > replication of transactions or deltas. ... > Secondly I take it you are making a mistake in the schema. ...
    (microsoft.public.sqlserver.replication)