Snapshot agent obliterates conflicts

Posted by mwolfe02 on Stack Overflow See other posts from Stack Overflow or by mwolfe02
Published on 2010-04-26T15:03:31Z Indexed on 2010/06/03 21:14 UTC
Read the original article Hit count: 210

We are using merge replication in SQL Server 2000. We have a snapshot agent that runs every night that updates the publication snapshot. About six months ago we updated from SQL Server 7.0 to 2000 (that's not a typo). We noticed a sharp decline in conflicts at that time but could not track down the reason. We finally found that the daily snapshot agent is recreating the conflict tables every night. This seems to be a change in functionality from SQL Server 7.0. We were running the snapshot agent before and the conflicts would accumulate.

Is there some way to prevent the data in the conflict tables from being lost when the snapshot runs? Can anyone confirm a change in behavior between 7.0 and 2000? Our current plan is to simply stop automatically updating the publication snapshot. Is that a reasonable workaround?

Here is the line from the script that is adding the snapshot:

exec sp_addpublication_snapshot 
  @publication = N'MyPub'
, @frequency_type = 4
, @frequency_interval = 1
, @frequency_relative_interval = 1
, @frequency_recurrence_factor = 0
, @frequency_subday = 1
, @frequency_subday_interval = 5
, @active_start_date = 0
, @active_end_date = 0
, @active_start_time_of_day = 500
, @active_end_time_of_day = 235959

Here is the step that runs in the agent job:

  • Step Name: Run agent.
  • Type: Replication Snapshot
  • Command: -Publisher [WCDBS02] -PublisherDB [TaxDB] -Distributor [WCDBS02] -Publication [TaxDB] -ReplicationType 2 -DistributorSecurityMode 1

This appears to be running the Replication Snapshot Agent Utility. There is no mention on that link about dropping and recreating system conflict tables, nor is there any flag that can be set to alter this behavior.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2000