Re: "publisher always wins conflict" resolver? (for merge replication under SQL 2000)



"Hilary Cotter" <hilary.cotter@xxxxxxxxx> wrote in message
news:E5D11F8C-57EF-44C3-AD5D-1F6C9247C99F@xxxxxxxxxxxxxxxx
It sounds like it is only occuring on a subset of tables. In this case you
need to run profiler on the publisher and subscriber to narrow down the
DML which is causing this.

Could you post the problem table schemas here and possibly the
publication/subscription script so we can try to repro this?

thanks for offering! in principle, i'd be glad to, though i'm not sure
exactly what you'll need or how practical it will be. the whole DB has some
hundred or so tables.

so i'll start with a portion of the basic script for the table in question.
several other tables reference this table's primary key doc_id

how much detail would you want? constraints? extended properties? triggers?
indices?

perhaps it's worth mentioning that we were able to reduce an instance of the
problem to inserting as single item into this table with the ID that is
apparantly problematic: wait a minute or so and a conflict arises which is
resolved by deleting the row.

cheers, Tim

- - - - - -
CREATE TABLE [dbo].[doc] (
[doc_id] uniqueidentifier ROWGUIDCOL NOT NULL ,
....some two dozen nullable smallint, numeric, nvarchar, ntext, datetime,
uniqueidentifier fields...
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [dbo].[doc] ADD
CONSTRAINT [DF_doc_doc_id] DEFAULT (newid()) FOR [doc_id],
...

i noticed there's a "conflict table" for this table apparently. it strongly
resembles the original
CREATE TABLE [dbo].[conflict_P_IN_CONTENT_doc] (
[doc_id] uniqueidentifier ROWGUIDCOL NOT NULL ,
...

- - - - - -
the replication in reduced form is:
....
exec sp_replicationdboption @dbname = N'In.....', @optname = N'merge
publish', @value = N'true'
....

use [Internews4]
GO

-- Mergepublikation wird hinzugefügt
exec sp_addmergepublication @publication = N'P_IN_CONTENT', @description =
N'Merge publication of xxxDB database from Publisher xxxSERVER.', @retention
= 7, @sync_mode = N'native', @allow_push = N'true', @allow_pull = N'true',
@allow_anonymous = N'false', @enabled_for_internet = N'false',
@centralized_conflicts = N'true', @dynamic_filters = N'false',
@snapshot_in_defaultfolder = N'false', @alt_snapshot_folder =
N'Y:\MSSQL\REPLDATA\unc', @compress_snapshot = N'false', @ftp_port = 21,
@ftp_login = N'anonymous', @conflict_retention = 14, @keep_partition_changes
= N'false', @allow_subscription_copy = N'false', @allow_synctoalternate =
N'false', @add_to_active_directory = N'false', @max_concurrent_merge = 0,
@max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @publication =
N'P_IN_CONTENT',@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, @snapshot_job_name =
N'xxDB-xxxDB-P_IN_CONTENT-3'
GO


exec sp_grant_publication_access @publication = N'P_IN_CONTENT', @login =
N'distributor_admin'
....100+ other tables omitted...
exec sp_addmergearticle @publication = N'P_IN_CONTENT', @article = N'doc',
@source_owner = N'dbo', @source_object = N'doc', @type = N'table',
@description = null, @column_tracking = N'true', @pre_creation_cmd =
N'drop', @creation_script = null, @schema_option = 0x000000000000CFF1,
@article_resolver = null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo', @auto_identity_range = N'false',
@verify_resolver_signature = 0, @allow_interactive_resolver = N'false',
@fast_multicol_updateproc = N'true', @check_permissions = 0
....


and there are 3 subscriptions along these lines:
-- Mergeabonnement wird hinzugefügt
exec sp_addmergesubscription @publication = N'P_IN_CONTENT', @subscriber =
N'xxDBxx', @subscriber_db = N'xxxDB', @subscription_type = N'push',
@subscriber_type = N'local', @subscription_priority = 0.000000, @sync_type =
N'automatic', @frequency_type = 4, @frequency_interval = 1,
@frequency_relative_interval = 1, @frequency_recurrence_factor = 0,
@frequency_subday = 8, @frequency_subday_interval = 1, @active_start_date =
0, @active_end_date = 0, @active_start_time_of_day = 0,
@active_end_time_of_day = 235959, @enabled_for_syncmgr = N'false',
@offloadagent = 0, @use_interactive_resolver = N'false'
GO


.



Relevant Pages

  • Re: Add Merge Subscr w/ nosync doing many metadata updates???
    ... N'Merge publication of fxDB6 database from Publisher PROD.' ... N'Merge publication of fxDB6 database from Publisher DEVLAB1.' ... 1Mill+ rows), performed table maintenance at subscriber, then added ...
    (microsoft.public.sqlserver.replication)
  • Re: Upgrading merge replication to 2005
    ... Subscriber to a merge publication can be any version no later than the ... So it would work with a SQL 2000 publisher and SQL 2000 ... Subscriber, but not a SQL 2005 Subscribers. ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.replication)
  • Trans Replication error
    ... the publication and subscriptions and reconfigured all, ... publisher, ... Take a full backup of published database, leaving copy of backup file on ... create subscription for each subscriber: ...
    (microsoft.public.sqlserver.replication)
  • Re: The row was not found at the Subscriber when applying the replicated command.
    ... The publisher was just moved to this server last night and was ... > We dropped the old publication and created a new publication from scratch. ... > various records with the error: The row was not found at the Subscriber ... > replicate as updates instead of inserts/deletes. ...
    (microsoft.public.sqlserver.replication)
  • Re: The process cound not enumerate changes at the subscriber - Invalid character value for cast
    ... both the subscriber and publisher. ... DBMS: Microsoft SQL Server ...
    (microsoft.public.sqlserver.replication)