0

We have Merge replication configured between 1 publisher and 12 subscribers all having SQL server 2008 R2

On one of the subscription I am getting below error

Error messages:
The merge process could not replicate one or more UPDATE statements to the 'Subscriber' because a stored procedure failed to execute. Troubleshoot by using SQL Profiler. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200989)
Get help: http://help/MSSQL_REPL-2147200989
Cannot insert duplicate key row in object 'dbo.MSmerge_contents' with unique index 'nc2MSmerge_contents'. (Source: MSSQLServer, Error number: 2601)
Get help: http://help/2601

In the error its mentioned that " Cannot insert duplicate key row in object 'dbo.MSmerge_contents' with unique index 'nc2MSmerge_contents'" I checked nc2MSmerge_contents index script but there is no unique constraint specified for the index

CREATE NONCLUSTERED INDEX [nc2MSmerge_contents] ON [dbo].[MSmerge_contents] 
(
    [generation] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

Below is the table structure

enter image description here

I need to fix this without dropping/recreating the subscription. Can anyone please help

Thakur
  • 1,890
  • 5
  • 23
  • 33

1 Answers1

0

problem was that database and indexes were corrupted. fixed after following below link

https://dba.stackexchange.com/questions/16113/unique-index-corrupted-sql-select-query-returns-single-row-but-create-unique-in

Community
  • 1
  • 1
Thakur
  • 1,890
  • 5
  • 23
  • 33